NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
meta-meta-classes (Score:1)
Suppose you have a class Book. You refer to the class as Book, and instances of the class as Books. The same name is used interchangeably without confusion. I think that the same should apply to 'meta-class'. Just as Books are instances of the Book class, I think meta-classes are instances of the meta-class class.
AFAIK The C<Class> class is the meta-class class in perl 6, and meta-classes are instances of C<Class> (what you ge
Re:meta-meta-classes (Score:1)
As Autrijus pointed out, the meta-meta-class is not accesible in the "user space", but a language implementation level object. And the reason we are calling it the meta-meta-class is that it actually is not MetaClass itself, but a MetaClass is an instance of the MetaMetaClass. (it's confusing I know)
To expand on your example: the
class Book {}can be called "Book". When you call themetamethod on Book, you will get an instance of the Class metaclass for Book, not the Class class.At some point
-stvn
Re:meta-meta-classes (Score:1)
Thanks for your detailed response and amazing work getting oo going in pugs. Still twisting my brain into the right shape to fit this stuff in
As you say, calling C<meta> on the C<Book> class yields an instance of the C<Class> metaclass that describes the C<Book> class. My example takes this one step further by calling the C<meta> method on this metaclass and (by my assumption) getting an instance of the C<Class> metaclass that describes the C<Class> class. T
Re:meta-meta-classes (Score:1)
Let me first say that we are venturing into unspecced territory here. So anything I say is subject to the whim of @larry.
What said you is correct, with one minor adjustment. You said:
But you missed a few metasA.meta.meta =:= A.meta.meta.metais true, as isA.meta.meta.meta =:= A.meta.meta.meta.metaand on ad infinitum.Aren't meta-meta-classes fun :)
-stvn
Reply to This
Parent