|
|
|
|
|
by kragen
21 days ago
|
|
However, it would be impossible to implement a #toggle method in Smalltalk that behaves like this, because you're calling it on the singleton True (or False) object; Smalltalk local variables, like Lisp variables, are references to objects rather than objects themselves. (You obviously know this, but it might be a surprise to many people reading this thread.) |
|
Something like toggle is also impossible in languages that favour immutability and forward progress requires creating new variables, like several functional and logic languages.