2 ms·
Dart initially had it, but JS compatibility was more important. However they don't have JS compatibility either (Dart does not round off large integers like JS
by ErikCorry 4y ago
Dart initially had it, but JS compatibility was more important.
However they don't have JS compatibility either (Dart does not round off large integers like JS does), so I forget what the point was.
Dart also (very early) had infinite precision fractions. So if you divided 355 by 113 you didn't get 3 or 3.1415... you got the fraction 355/133 which was an instance of a first class numeric type.
Unfortunately this means your numbers can grow to need arbitrary amounts of storage in loops.
- gumby 4y agoCommonlisp has rationals as well (355/133) though division doesn't generate them by default.