chromatic wrote:
A12 and S12 describe introspection on objects and classes. The
metaclass instance has the method getmethods() which returns "method
descriptors". The design specifies several traits queryable through
these descriptors.
[...]
Currently, there's no way to query these traits through introspection,
nor is there a description of the descriptors beyond indicating that
they're some sort of object.
I have no strong feeling as to what type of object they should be, but
they ought to support some sort of traits() method to return a list of
[...]
Well, arguably Stevan's perl5/Perl6-MetaModel is the best place to
prototype such interfaces.
Getting traits requires deeper introspection. You need to ask the
Meta-Objects themselves what properties they support. In other words,
by looking at .meta.meta you should be able to see this. Even though
we're aiming to avoid the Smalltalk '72 problem[1] of
meta-meta-meta-meta-model madness. There is some early rantings of it
in modules/Perl-MetaModel/docs/perl6_meta_model.pod
Quite how far the "turtles all the way down" principle works will be an
interesting test of the design, I think. I wouldn't expect making
changes to .meta objects 3-4 levels deep to work, and that they should
be like a "reciprocal" (or a metaclass that can be its own metaclass).
Sam.
1. Piers Cawley drew the prior art connection here. I forget the exact
years, but there were two Smalltalk language versions, the first where
each meta-model layer was independant, and the second where they had
figured out how to make the system close back on itself simpler. Maybe
someone can give a better description than this.