[squeak-dev] Re: Pragma support in Squeak/Pharo/Cuis

Eliot Miranda eliot.miranda at gmail.com
Fri Jan 28 23:16:05 UTC 2011


On Fri, Jan 28, 2011 at 1:39 PM, Chris Cunnington <
smalltalktelevision at gmail.com> wrote:

> I've got some notes from 2 May 2010 about pragmas. Eliot produced this
> example at the time:
>
>        x := Editor class compiledMethodAt: #blinkingCursor.
>
>        x pragmas
> {<preference: 'Blinking Text Cursor' category: 'Morphic' description: 'When
> true, the text cursor will blink.' type: #Boolean>}.
>
> I think that corresponds with his message today:
>
>
>   Having it as a message pattern means:
>> - one can search for references to the method tag by searching for senders
>> of the message tag's selector
>>
>
> But the ultimate destination of all method annotations is a #perform:?
>

Not necessarily, but often this can be a powerful pattern.  If a method tag
means something, can be interpreted somehow, then effecting this
interpretation via a perform is delightfully direct and minimal.  But
sometimes the meaning is beyond the system (e.g. as I wrote to myself today
<flag: 'rewrite this crap.'> ;) ) and so there is no interpretation that can
be implemented in Smalltalk code.

I take that from this:
>
>
>  - one can provide implementation(s) of the selector and hence execute the
>> method tag using perform
>>
>
> So the ultimate destination of all pragmas/method annotations/method tags
> is that somewhere a #perform: lurks waiting
> for it? Sometimes that's the Compiler class and sometimes it's another
> class with a #perform:.
>

Certainly that's possible for a significant subset of  potential uses.


> I'd appreciate it if somebody could say if this is an accurate picture.
> A "yes" will do it.
>

yes, with caveats :)

best
Eliot


>
> Chris
>

Stitch: I'm having a good day
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20110128/cda2a0d6/attachment.htm


More information about the Squeak-dev mailing list