2 ms·
Python comes close, but what makes Smalltalk special is that flow control and loops are done with objects. There are almost no keywords. Imagine that you could
by ssdspoimdsjvv 5y ago
Python comes close, but what makes Smalltalk special is that flow control and loops are done with objects. There are almost no keywords.
Imagine that you could do something like this in JavaScript:
(name === "Mike").ifTrue(() => console.log("Hi Mike");
The implementation of this is done through a Boolean class, which has two subclasses, True and False.
True implements the ifTrue(fn) by invoking "fn", False simply returns.
The main advantage is that everything is predictable and inspectable.