3 ms·
Now let's wait another decade before they add BigDecimal...
by qwerty456127 7y ago
Now let's wait another decade before they add BigDecimal...
- Gibbon1 7y agoI think a friend of mine said he was in a meeting back when Javascript was being standardized. Mike Cowlishaw proposed that Javascript use REXX's Decimal type instead of IEEE 754. Everyone thought that was a really bad stupid idea.
- qwerty456127 7y agoIt probably is when it's about "instead". IEEE 754 floating point computations are much much faster (given hardware support) while the precision is sufficient for most of the applications that don't have to deal with money.
- Gibbon1 7y agoI talked to my friend, he said Mike Cowlishaw tried very patiently explaining multiple times the need for a decimal type and basically ran into your argument. IE. If we provide a decimal type as a default. Then everyone will use it and it'll be 'slow'. Thus this is a bad idea. So we should not make that even an option. Because IEEE 754 is fast and fast is 'good' Frankly that decision was the worst language decision ever made bar none.
- frutiger 7y agoWhile not directly related to BigDecimal, my employer (Bloomberg) primarily sponsored this effort through the arduous TC39 process and sponsored the implementation in any browser vendor that wanted primarily as a stepping stone to standardising decimal floating point. We see BigInt as a relatively uncontroversial but important extension of the numeric type system of JavaScript. Once the door is open for a type that is not immediately compatible with Number, potentially new numeric types can be introduced. Perhaps BigDecimal (or Rational?) can follow.
- bmn__ 7y agoThe technical committee are a bunch of dumbasses. There's no good reason to not specify bitint and bigrat at the same time.