Compiling a role name into a message to self
karl
karl.ramberg at comhem.se
Fri Nov 23 19:23:28 UTC 2007
There is a example in MorphicExtension where layout and other stuff etc
are held, and messages sent to Morph are sent to the extension.
Karl
Trygve Reenskaug wrote:
> No response on my first SOS.
>
> * I am now in my first dive into the compiler; there's a lot to
> learn.
> * I first found the pragmas, but they do not seem to fit my purpose.
> * I next found the message selector macro facility in
> MessageNode/special . Very neat, but I need to do something with
> a variable name, not a selector.
>
>
> There are a host of different kinds of variables- local, instance,
> class, pool, ... It would be nice with yet another one: "computed" or
> "aliased". A special syntax for a variable name that will lead to
> inlining a method for finding the object currently accessed through
> the name.
>
> I would really appreciate help from someone familiar with compiler work.
>
> Thanks
> --Trygve.
>
>
> On 19.11.2007 19:03, Trygve Reenskaug wrote:
>> I am just completing an experiment where I am programming with roles.
>> A role name stands for one or more objects; the actual binding occur
>> at run time. Example:
>> /(self playerForRole: #currentStar) displayLarge/
>> It would be much more readable if I could write something like
>> /¤currentStar displayLarge / or /§currentStar displayLarge/
>> or / :-) currentStar displayLarge /or ...
>> /currentStar /is a role name, /self playerForRole:/ searches down the
>> stack to find the appropriate object binding .
>>
>> I suppose I have to choose an appropriate syntax and doctor the
>> compiler. Any ideas?
>>
>> Thanks
>> --Trygve
>> --
>>
>> Trygve Reenskaug mailto: trygver at ifi.uio.no
>> Morgedalsvn. 5A http://folk.uio.no/trygver
>> N-0378 Oslo Tel: (+47) 22 49 57 27
>> Norway
>>
>
>
> --
>
> Trygve Reenskaug mailto: trygver at ifi.uio.no
> Morgedalsvn. 5A http://folk.uio.no/trygver
> N-0378 Oslo Tel: (+47) 22 49 57 27
> Norway
>
> ------------------------------------------------------------------------
>
>
>
More information about the Squeak-dev
mailing list
|