Strict alternation of data and behaviour in Smalltalk
Wed 25 Jun 2025 11:07 CEST
Smalltalk programs strictly alternate between data and behaviour. Messages (the only kind of data in Smalltalk) are implicit, constructed fresh at each point in the program method call syntax is used, and are shallow, meaning that the slots in each message object always contain references to objects, never other messages.1
This is in contrast to most other languages with true data, where (for example) lists may contain other data, and are not constrained to containing only object references / function values.
So, what would a Smalltalk be like without this strict alternation, where messages could appear as values? Suddenly the universe of Smalltalk values grows larger: previously, everything was an object, but now some things are data!
-
Of course, objects acting as reified messages may appear! ↩