Where the implicit self is in St80 [was: Fear and loathing of the "perlification" of Smalltalk]

Jason Johnson jason.johnson.081 at gmail.com
Thu Sep 6 16:49:55 UTC 2007


I'm not disturbed nor offending.  I often find your messages
enlightening.  But perhaps it's my lack of sleep, or something, but
for the life of me I don't see this one. :)

On 9/6/07, Klaus D. Witzel <klaus.witzel at cobss.com> wrote:
> Hi Jason,
>
> on Thu, 06 Sep 2007 17:44:54 +0200, you wrote:
>
> > On 9/6/07, Klaus D. Witzel wrote:
> >> Hi Jason,
> >>
> >> But it has! :) Smalltalk has implicit self, to some extent. Consider
> >> that
> >> Smalltalk and Self are at the same language level. Then, whenever you
> >> use
> >> nil, true, false, a temp/arg, an iVar or a class/pool/global var, you
> >> send
> >> that implicitly to self, in both languages :)
> >
> > To self?  If you mean self as in the receiver of the message (which is
> > what I mean), then I disagree.
>
> Right, didn't mean that.
>
> > In Smalltalk, when the compiler sees a
> > use or an assignment of an iVar then he generates a push opcode that
> > accesses the current receiver,
>
> Sure, that was mentioned in my previous mail.
>
> > but that's not a message send, that's a
> > low level memory access.
>
> right, after the compiler has done its work.
>
> >  temp/arg variables are located in the
> > context object, not the receiver.
>
> right, the implicit self starts with the context object.
>
> >  And nil, true and false are
> > singleton objects.
>
> sure. nobody claimed they are not singleton, no?
>
> > I don't see what you mean with this at all.
>
> Sorry for disturbing you (no offense). I offer to take this offline, if
> you like.
>
> >> In Smalltalk it's the compiler who knows what the receiver(s) of these
> >> implicit self messages are, it [the compiler :) ] quickly calculates the
> >> intended binding and emits a corresponding bytecode, optimizing away the
> >> costly message send.
> >>
> >> Can you see it? :)
> >>
> >> In Self the initial non-optimizing compiler doesn't know that quick
> >> binding. But the Self runtime optimizing compiler comes to the very same
> >> result (binding) as Smalltalk's compiler.
> >>
> >> It's a matter of view on things :) It'd be easy in Smalltalk to always
> >> send (self nil), (self true), (self iVar), etc :)
> >
> > Sorry, I don't understand this at all.  This may be a way of looking
> > at it, but I don't see it in the language, nor the blue book
> > specifications.
> >
>
> NP. it's as I said, a matter of view.
>
> /Klaus
>
>
>



More information about the Squeak-dev mailing list