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:? 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:.
I'd appreciate it if somebody could say if this is an accurate picture. A "yes" will do it.
Chris
On Fri, Jan 28, 2011 at 1:39 PM, Chris Cunnington < smalltalktelevision@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
Thanks for this great discussion y'all; it's great to learn from your experience about good uses for pragmas.
On Fri, Jan 28, 2011 at 5:16 PM, Eliot Miranda eliot.miranda@gmail.com wrote:
On Fri, Jan 28, 2011 at 1:39 PM, Chris Cunnington smalltalktelevision@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
squeak-dev@lists.squeakfoundation.org