[squeak-dev] Re: Re: pragmas usage
itsme213
itsme213 at hotmail.com
Wed Mar 19 13:57:36 UTC 2008
"Ramon Leon" <ramon.leon at allresnet.com> wrote in message
> Pragmas are static and aren't nearly as flexible as
> Magritte descriptors, which are real objects and don't face the
> limitations
> of pragmas.
Perhaps it need not be either-or? e.g. The pragma could be evaluated to
record the "static" descriptions on the classes as any kind of real objects,
including Magritte-like Descriptions:
Foo>>x
<setUpMeta: #bar>
PragmaInterpreter>>setUpMeta: aSymbol for: aClass
aClass recordMeta: aSymbol
And there could still be instance-level access from objects, which by
default just uses the "static" descriptions that PragmaInterpreter recorded
on the classes, but has a hook for dynamic (instance-specific) behavior:
Object>>getMeta: aSymbol
(self class getMeta: aSymbol)
overridenBy: (self dynamicGetMeta: aSymbol)
Just a thought.
- Sophie
More information about the Squeak-dev
mailing list
|