[squeak-dev] Re: Re: pragmas usage

Ramon Leon ramon.leon at allresnet.com
Wed Mar 19 15:02:16 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

I'm sure you could, but I wouldn't, I prefer my metadata to be static.  It's
a cross language approach that allows me to use the same techniques in .Net
(still the majority of my job), which also has pragmas (called attributes).
I also prefer the ad-hoc nature of pragmas, I can just make them up as I
need them without the need to try and fit them into a big description
hierarchy.

Ramon Leon
http://onsmalltalk.com




More information about the Squeak-dev mailing list