3 ms·
Until you need to deal with decimals instead of floats, then you are going to hate yourself because you have to pull in some third party library because the lan
by snuxoll 11y ago
Until you need to deal with decimals instead of floats, then you are going to hate yourself because you have to pull in some third party library because the language treats every single number as a float (and floating point errors are a lot more common than most people think even when they are adding together simple numbers).
- Dylan16807 11y agoIntegers will do no better at pretending to be a decimal type without a library.
- snuxoll 11y agoSure, but most other languages have built-in support for decimal types. Java has BigDecimal, as does Ruby, Python has the decimal module, C# has System.Decimal, the list goes on. Javascript doesn't even have proper integers to guarantee the functioning of this correctly, it's a really sad state.
- Dylan16807 11y ago>Javascript doesn't even have proper integers to guarantee the functioning of this correctly I don't understand what you mean at all. Javascript should be able support a decimal library just as easily as a language with integers.