3 ms·
> That would kill Python for scientific use. If Python used the Perl 6 model, you could still use floats by writing your literals in scientific notation, so if
by amyjess 10y ago
> That would kill Python for scientific use.
If Python used the Perl 6 model, you could still use floats by writing your literals in scientific notation, so if you want floating-point performance, you can still get it. For example, 2.2 would be a Fraction, but 2.2e0 would be a float. I don't want to eliminate floats from the language, just hide them from average users by default.
And it's not like rationals-as-default are just some weird Perl 6-ism. Haskell does the same thing, and the language is fairly well-received.
> Also, while nice, Fractions have their own pitfalls due to potentially catastrophic runtime behavior.
Elaborate?