[self-interest] Re: Quick question on Self Grammar

Jecel Assumpcao Jr jecel at lsi.usp.br
Thu Dec 10 17:27:07 UTC 1998

Dru Nelson wrote:
> I was reading the self grammar. Am I right in
> assuming that...
>   doIt.
>   or a:
>   setSlot: 'x' With: doIt.
> works, by having the receiver of the unary message
> doIt (which is probably a slot), is parsed as a
> null token for each of these expressions. Which
> would imply the default 'self' :-) as the receiver?
> Just a quick check,

I am not sure if this is what you are asking, but typing


at the prompt (or in an evaluator in the graphical user interface)
is indeed parsed as the unary message 'doIt' sent implicitly to
'self', which in the case of the prompt is the shell object and
in the case of an evaluator it is the object represented by the
outliner the evaluator is in. I'll indicate this by writing it as

   <self> doIt

ok? The expression

   setSlot: 'x' With: doIt.

would mean

   <self> selfSlot: 'x' With: (<self> doIt).

Here the 'doIt' message is sent to 'self' (shell or object represented
by outliner) and the result of this is used as an argument (along with
the string object 'x') to the 'selfSlot:With:' message that is also
sent to 'self'.

I think I just repeated what you had already written, but if that is
what you were asking then I hope I've confirmed your impression.

-- Jecel

Free Web-based e-mail groups -- http://www.eGroups.com

More information about the Self-interest mailing list