|
|
|
|
|
by GuuD
1270 days ago
|
|
Fuck, I mean… yeah. Thanks for one more insight, by showing me that sending message/calling a method is a binary operation, seems so obvious but I never made that connection. This day started by shelling by Russian rockets, but reading the post and your comment somehow made it… good?
I always get caught off-guard by how much baby we’ve thrown with the water with modern languages compared to some brilliancy we had in Lisp and Smalltalk. Both are extremely out of my cup of tea region, but I learn so much when I interact with them. The only thing JS and something like Java taught me is to stay away:) |
|
The other way around.
A "binary message" is specifically the message of binary operators. Smalltalk also has unary messages (named messages with no parameters), and keyword messages (non-binary messages with parameters).
Its precedence rules are unary > binary > keyword, and left to right.
So
binds as You can still get into sticky situations, mostly thanks to the cascading operator ";": sends the message following ";" to the receiver of the message preceding ";". So here it's equivalent to now consider: This is equivalent to Because the message which precedes the ";" is actually "+", whose receiver is "foo":