globals considered harmfull

I.R.Woollard at I.R.Woollard at
Sat Apr 2 00:34:07 UTC 1994

>Now we can just say "point" and get a copy of the prototype, but
>must write "the point" when we really want to refer to the
>original prototype itself.

perhaps easier to read is:

"new point"

which is given by:

lobby _AddSlots:
    new = (| theGlobals =
                (| defaultBehavior* = defaultBehavior.
                   globals* = globals |).
           ^undefinedSelector: sel Type: msgType Delegatee: del
            MethodHolder: mh Arguments: args = 
                (( sel sendTo: new theGlobals WithArguments: args) copy) |)

It could be argued that this code is less efficient, so should not be
used. Then again, it could be argued that Self is less efficient than
C so should not be used, but I don't agree with that either. ;-)

In any case, if the above code is too inefficient for a given
application it is trivial to give a parent to 'new' and put the
particular implementation of the copy into it...


'In cyberspace nobody can hear you ook'

More information about the Self-interest mailing list