5 ms·
Arithmetic is a relatively self-contained part of a language. The problem isn't that JavaScript's arithmetic is lame, it's that they didn't leave any way for th
by prodigal_erik 16y ago
Arithmetic is a relatively self-contained part of a language. The problem isn't that JavaScript's arithmetic is lame, it's that they didn't leave any way for the programmer to fix it—even if you make rational bignums out of arrays of doubles (or whatever), you can't make them drop-in replacements by overloading operators. It's a strange oversight for a language which lets instances override methods.
- pedrocr 16y ago>It's a strange oversight for a language which lets instances override methods. That's only because everything is an instance in Javascript. There are no classes, it's prototype OO.