Donald Raab: Does Your Programming Language Ever Surprise You in a Good Way? (opens in new tab)
What does two divided by three return in your programming language?Photo by on What is behind door 2 / 3?The answer to this question varies by programming language. Smalltalk changes the script. The answer to this question in Smalltalk is a Fraction.In Smalltalk, the result of 2 / 3 is a FractionWut the?The real surprise as it turns out is not that Smalltalk has support for fractions. That was the initial surprise. The real surprise is how / works. The / in Smalltalk is a binary message sent ...
Read the original article