4 ms·
This was one of the changes I made to Smalltalk syntax for Objective-S[1]: The pipe "|" as an analog to the cascade ";", but sending to the result, like a norm
by mpweiher 1y ago
This was one of the changes I made to Smalltalk syntax for Objective-S[1]:
The pipe "|" as an analog to the cascade ";", but sending to the result, like a normal pipe would. This avoids having to go back and add parentheses when you have a longer expression involving keyword sends.
For example navigating a nested set of dictionaries
self classDefs at:className.
(self classDefs at:className) at:which.
((self classDefs at:className) at:which) at:methodName.
vs.
self classDefs at:className.
self classDefs at:className | at:which.
self classDefs at:className | at:which | at:methodName.
[1] https://objecttive.st https://objecttive.st