Hacker News new | ask | show | jobs
by lispm 610 days ago
The answer would depend on what you think "message sending" is and why you think Smalltalk does not support "message sending".
2 comments

My intuition on the phrase "message sending" is that it should be distinguished by immutable values. If I send you a message by writing it on a piece of paper, I don't expect that if you write on that note it will change any information I have on me. The message is passed by value, not by reference. I should be able to copy the message, send it over a network or store it to external memory, and have everything still work the same.

CLOS and Lisp inherently involve passing objects by reference. If they allow mutation operations, the receiver of a value can mutate it and that's visible to the caller.

These physical analogies also make me think that for it to be message sending then it must be asynchronous, because if I send you a letter then I'm not forcefully frozen from the instant I drop it into the postbox until I hear back.
Just like Smalltalk, which has no concept of immutable types, other than only providing accessor messages, which is an active decision by the class implementer.
Well, as I understand it, it achieves that by making the message passing extremely fine grained. So, in a sense all the messages are immutable, but only by creating a hairball of objects and messages.

Maybe I should be thinking about what sending references to objects in messages means.

Meanwhile I have had a chance to skim the book and I have reason to believe that OO in LOOPS is solved very similarly to how it is in ST-76 and 80, i.e. virtual method dispatch via selector and calling a compiled method. A selector is simply the method signature, even if some people in the Smalltalk community refer to it as a "message". In contrast, there was actually something like message passing in Smalltalk-72, albeit synchronous.