10,000 ft View of Perl 6 MetaModel

Stevan on 2005-08-06T06:04:26

Earlier today on #perl6, kolibrie asked me about documentation for the metamodel. Sadly, none actually existed, and with all the bootstapping code in the Perl 5 version, just "reading the source" can be confusing. So while I was waiting for some large data files for $work to upload, I sketched out a quick 10,000 ft view of the metamodel.



i(Foo) - instance of Foo Foo - the user-level Foo class class(Foo) - the instance of Perl6::Class named "Foo" meta(Foo) - the instance of Perl6::MetaClass which describes Foo

+---------------+ | i(Foo) | +---------------+ | class |------+ | instance_data | | +---------------+ | | | NOTE: ___ | At the Foo level is where ( ) | the interpreter will likely +-------------( Foo )------------+ perform some 'magic' to | (___) connect the user and meta | levels. | ....|......................................................... | | | +---------------+ +-------->| class(Foo) | +---------------+ +---------| meta | | | name | | +---------------+ | | +---------------+ +-------->| meta(Foo) | +---------------+ | name | | version | | authority | | %methods | | %attributes | +---------------+

Any comments, questions, suggestions or even disparaging remarks are welcome. A more complete document is in the pugs tree here.

- Stevan