Returning an int to denote less than, equal, and greater than is a very small complexity, and makes it very fast to check the result.

The point of that part of the rant is that using an integer is very not-precise, typing-wise. Having more precise typing sometimes helps.

In a little higher level language using a 3-value enum (as in Haskell, more or less) is still sufficiently efficient. And Ada language shows that often you can have both precise types (strong typing) and almost C-like efficiency.


Reply via email to