3 ms·
This is cool. For those who may have seen Smalltalk before and are wondering where all the colons went in the example code snippets: The language discussed in t
by tom_mellior 9y ago
This is cool. For those who may have seen Smalltalk before and are wondering where all the colons went in the example code snippets: The language discussed in these articles appears to be Smalltalk-72. Modern Smalltalks are based on Smalltalk-80, which is quite different in some respects.
In particular, modern Smalltalks use call-by-value, while these early Smalltalks used something more like call-by-name. Message arguments were passed in as unevaluated structures and parsed by the method. This allows some syntactic tricks that may look more natural than modern Smalltalk. For example, you could write "size increase by x" rather than the modern "size increaseBy: x" because the "increase" message could check for the presence of the word "by" and ignore it.
So this was kind of like using Lisp macros to define DSLs like the LOOP macro, but it was all evaluated at runtime.