News for hackers. Stuff that matters.
Re:Fast midpoint between two integers without overflow by ErikCorry on Wednesday December 07, 2022 @05:37PM (#33901364)
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.

Re:Fast midpoint between two integers without overflow by gumby on Wednesday December 07, 2022 @06:28PM (#33901878)
Commonlisp has rationals as well (355/133) though division doesn't generate them by default.