|
|
|
|
|
by billsix
1805 days ago
|
|
I remember while learning Smalltalk how surprised I was when if statements and loops weren’t syntax of the language, but methods on objects. True and False are singletons of a Boolean class, which has a method ifTrue:ifFalse which take lambdas as arguments. For loops, a lambda which returns True or False has a method whileTrue: which takes a lambda as an argument. Although I like Python, and I don’t know JS well, I really enjoyed learning Smalltalk, even though I will likely never use it professionally. |
|