Re:A little thing to love about Perl 6 and COBOL
by kevin_thibedeau on Wednesday February 04, 2015 @09:57PM
(#9001497)
What are the consequences of using rational numbers by default? I can imagine unexpected bloat when large arrays are in use that you expected to contain native floats but are now a more complex object.
[ Parent
| on HN ]
Re:A little thing to love about Perl 6 and COBOL
by perlgeek on Thursday February 05, 2015 @07:29AM
(#9002864)
You only get compact storage if you declare the array with a type constraint on the elements, so at that point you start to actively think about the numeric type, and can still convert to floating point if that's what you want.