implicit self

Jecel Mattos de Assumpcao Jr. jecel at lsi.usp.br
Wed Sep 13 02:52:08 UTC 1995


I wanted to better understand the meaning of sending implicit
self messages, so I tried the following:

    ( | x <- 4. silly = ( | x <- 2. k: y = (x+y) |
                                 k: 0 ) | )

I wondered if sending "silly" to this object should return 2 or
4 ( my system returns 2 ) but this results in the error:
    "local methods not implemented yet"

Does this mean that they will be implemented in the future and,
if so, what should be the semantics of the implicit self send
in this case.

An interesting note is that my implementation allows:

    ( | x <- 4. meth = ( | thisContext = (self) |
                           .........
                           .........
                           .... ifTrue: [ thisContext debug ]
                           .........
                       )
     | )

This is important to me because it means that while "self print"
is a case of recursion, "print" is not ( and recursion is very
inefficient in my object model :-(  )

-- Jecel



More information about the Self-interest mailing list