Day 187 (r6222): Visiolizing the MetaModel.

autrijus on 2005-08-12T20:08:26

As I promised yesterday, today I worked on drawing out the metamodel, covering various factors involved in the bootstrapping -- i.e. exposing the internal implementation of classes into user space as ::Class. It's available in two formats:

Much thanks to #perl6 and #parrot folks for encouragement and feedback. Please refer to this previous journal for the origin of those gnostic names. Stevan's new Mini MetaModel is a much more readable Perl 5 implementation -- bootstrapped and tested in less then 200 lines!

Other documents under the same directory are helpful, too, including Stevan's 10k ft view and kolibrie's 20k ft view.

On the PIL2JS front, iblech sped up compilation by 300%+, and the compiler now takes much more reasonable amount of memory. He also hacked in junctive autothreading inhibition for Bool parameters, returning out of multiple blocks, and various other nifty things.

fglock polished the Array container and List value implementation for the Perl5 runtime, and plans to expand his work on other container and value types.

That's it for today. See you tomorrow! :-)


no gnosis;

Simon on 2005-08-12T22:26:15

According to that diagram, ::Point is not a ::Class. Can that be right?

Re:no gnosis;

autrijus on 2005-08-13T05:38:55

A Point is-a Object... That is, ::Point inherits from its superclass, ::Object, as shown by the white pizza-arrow line. Surely a Point object would not be a valid class object.

On the other hand, the metaclass object ::Point itself -- on the left-hand side -- is an instance of ::Class, as shown by the dotted line.

Class versus metaclass

Simon on 2005-08-14T09:27:46

I think I see what you mean but I don't like the class/metaclass distinction at all. I'm in favour of pulling everything out into the runtime side of the drawing. That is, I think ::Point and ::Point.meta should be the same, and ::Point is not just a metaclass object but an honest-to-goodness class object. Why the distinction?

Re:Class versus metaclass

autrijus on 2005-08-14T10:45:47

The idea is the left-hand-side MetaClass should not be distinguishable, by the user, from the right-hand-side ::Class.

Conceptually, if we are implementing perl6 on perl6, then sure ::Class is just the metaclass itself.

But if you are, say, implementing perl6 on perl5 (which is what we're doing now), then you need a perl5-side entity to represent a perl6 class. That's what the MetaClass is.

Otherwise, you can't communicate with other perl5 objects -- "native" ones like DBI.

But it is that exact entity that gets exposed as a ::Class object, so the user won't be able to tell the difference.