Stories
Slash Boxes
Comments
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

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • I am not so sure about meta-meta-classes, or at least not that name.

    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
    • Tom,

      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 the meta method on Book, you will get an instance of the Class metaclass for Book, not the Class class.

      At some point

      --
      -stvn
      • by tyan (5925) on 2005.05.17 1:57 (#40454)
        Hi

        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. This is based on my assumption that there is a cycle at the Class level. I would have thought that for any class A, A.meta.meta =:= A.meta.meta.meta. Is this not the case (I am only considering how things work at perl6 level)?

        Tom
        • Tom

          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:

          My example takes this one step further by calling the meta method on this metaclass and (by my assumption) getting an instance of the Class metaclass that describes the Class class. This is based on my assumption that there is a cycle at the Class level

          But you missed a few metas :)

          My example takes this one ste

          --
          -stvn