Re: packages vs. classes

2006-05-26 Thread Stevan Little
On 5/23/06, Sam Vilain [EMAIL PROTECTED] wrote: Right, but we should really ship with at least a set of Meta Object Protocol Roles, that covers the core requirements that we will need for expressing the core types in terms of themselves; - classes and roles - attributes and methods - subsets

Re: packages vs. classes

2006-05-26 Thread Paul Hodges
--- Stevan Little [EMAIL PROTECTED] wrote: On 5/23/06, Sam Vilain [EMAIL PROTECTED] wrote: People can diverge completely with completely incompatible metaclasses that don't .do those roles, the only side effect of which being that people who write code for the standard Perl 6 metamodel

Re: packages vs. classes

2006-05-22 Thread Sam Vilain
Larry Wall wrote: 'Course, I left out everything about prototype objects there... The name Foo also (in context) represents an uninitialized object of the class in question. Any object, initialized or not, can get at its type handlers by saying Foo.meta $foo.meta and, in fact, the

Re: packages vs. classes {long}

2006-05-20 Thread Chip Salzenberg
On Fri, May 19, 2006 at 05:05:02PM -0700, Larry Wall wrote: So what's in a name? One could say that .meta is functioning more like a name sigil than like a method, and the Real Name of the metaobject is Foo::^Bar or some such, if it needs a name. Method, I like. Stealth sigil, I don't like.

Re: packages vs. classes

2006-05-19 Thread Larry Wall
On Thu, May 18, 2006 at 03:17:36PM -0700, Chip Salzenberg wrote: : What's the relationship in perl6 between namespaces and classes? Hmm, well, that's hard to put one's finger on, but to the first approximation namespaces are for declarational names, while classes can really only name things

Re: packages vs. classes

2006-05-19 Thread Larry Wall
'Course, I left out everything about prototype objects there... The name Foo also (in context) represents an uninitialized object of the class in question. Any object, initialized or not, can get at its type handlers by saying Foo.meta $foo.meta and, in fact, the Foo.^bar syntax is

Re: packages vs. classes

2006-05-19 Thread Chip Salzenberg
On Fri, May 19, 2006 at 12:35:11PM -0700, Larry Wall wrote: If this isn't answering what you were asking, please ask s'more, and I'll try to reply when I'm not busy having a grandbaby. adCONGRATULATIONSvance :-) Packages, modules, classes, roles, subsets, enums, etc. all pretend they are

Re: packages vs. classes

2006-05-19 Thread Chip Salzenberg
On Fri, May 19, 2006 at 12:53:29PM -0700, Larry Wall wrote: and, in fact, the Foo.^bar syntax is just short for Foo.meta.bar. So, you anticipated my half-question. The type of metaobject Foo.meta might be called Class if that's what the metaobject protocol decides it should be, but Perl the

Re: packages vs. classes

2006-05-19 Thread Chip Salzenberg
On Fri, May 19, 2006 at 02:51:55PM -0700, Chip Salzenberg wrote: On Fri, May 19, 2006 at 12:53:29PM -0700, Larry Wall wrote: The type of metaobject Foo.meta might be called Class if that's what the metaobject protocol decides it should be, but Perl the Language doesn't care. If so, then

Re: packages vs. classes

2006-05-19 Thread Larry Wall
On Fri, May 19, 2006 at 03:25:43PM -0700, Chip Salzenberg wrote: : Based on what I'm seeing, the Perl 6 type object is the thing that claims : the primary name associated with a class. Foo::Bar is the type object. : The metaobject seems to be anonymous. And the package seems to be fairly :

packages vs. classes

2006-05-18 Thread Chip Salzenberg
On Thu, May 18, 2006 at 02:52:53PM -0700, Chip Salzenberg wrote: { copied to P6L for the use case question below } Well, that message wasn't, but this one is... What's the relationship in perl6 between namespaces and classes? For example, given: package Foo { sub bar {...} } class Corge {