About reflection and it engineering
ducasse
ducasse at iam.unibe.ch
Thu Nov 6 08:13:07 UTC 2003
Hi
> Check out Python's new class heirarchy then. There is the standard
> object
> system, using built in classes-metaclasses, and then one can easily
> define
> their own metaclasses as needed.
>
> Singletons are extremely easy, as would a protoype based language be
> too.
>
> I haven't played with the meta programming level in Python much, but
> it's very
> powerful under there.
Having explicit metaclasses is easy but dangerous. Noury did that
several times in Squeak, nathanael too. However, with two explicit
metaclases and two simple naive methods we can break a complete system.
I suggest you to read the excellent paper written by Noury Safe
Metaclass Composition
OOPSLA'98
For me the metaclass limitation imposed by implicit metaclasses was the
smartest choice
made at that time. Sure we pay the price with limited reuse but we have
safety.
Now the future is bright because with traits we can solve a lot of the
problems of metaclass composition by simply composing metaclass based
on traits. We have a paper submitted on that topics if some of you are
interested.
More information about the Squeak-dev
mailing list
|