|
|
|
|
|
by moneytalks
3027 days ago
|
|
The desperate clinging to a numeric system oriented to the binary internals of a computer in the human interface to those internals is insane. Choosing base 2 numeric systems as the default number system in any high level language is just shortsighted and stupid. Maybe DEC64 is flawed, but can we stop pretending that we like binary-based default systems for any reason other than the barrier to entry it creates for newcomers and visceral feeling of communing with computer internals. Binary has a place -- in low-level languages. Like assembler. There's nothing wrong with any language providing a non-decimal system as an optional number type. The system we have in many high-level languages is a frankenstein of a binary system that you usually interact with through decimal representation. The proposal gets at least one thing right: the languages of the future will have a numeric system default that has less insanity. But it will take the passing of a generation or two of developers. |
|
In the real world, there are natural numbers, integers, rationals and real numbers.
Computer languages are designed with types that mimic this real-world number stack. Low-level binary implementation details don't leak unless you're overflowing or using bit operations.
What you're really complaining about is the fact that rationals aren't a first-class type in any popular language. With that I agree, it's a shame that corners were cut we three number types instead of four.