3 ms·
Not to disagree with anything the OP says, but a language with somewhat more recent currency that shares the "decimals are rationals by default" advantages is S
by blahedo 12y ago
Not to disagree with anything the OP says, but a language with somewhat more recent currency that shares the "decimals are rationals by default" advantages is Scheme (and Racket and so on). At least in Racket, floating point representation is an implementation detail of the inexact-real numbers, while the exact-rational numbers are correctly produced and computed on when you give values in decimal form.
Scheme (et al) are probably the more direct conceptual inspiration for Perl 6's rational decimals---the Perl 6 developers were certainly aware of it (as they were aware of pretty much all the major PL work out there :)
- kbenson 12y agoPerl 6 borrowed liberally from many sources. That does make it a very complex language, but you can omit many of the more complex features until you are more comfortable with them. There's a slide deck that touches on that point by the same author that was posted to HN recently called "Perl 6 for mere mortals" (a FOSDEM 2015 talk). 1: https://news.ycombinator.com/item?id=8953368 https://news.ycombinator.com/item?id=8953368