nits on BigInt Proposal
Bruno Jouhier
bjouhier at gmail.com
Fri Aug 4 22:19:59 UTC 2017
>* I remember that was a proposal for operator overloading. Was it decided
*>* against? I think that packages could solve this and many other problems if
*>* there was overloading.*
IMO Operator overloading is better than another built-in number type.
It solves a
wider range of problems: complex numbers, vectors, etc.
Even with decimals or big ints, overloading leaves more options open.
Some people need unlimited precision (computing zillions of decimals
of math constants). Others prefer a more compact, more efficient
decimal type with only 38 decimals and may get picky about rounding
rules. There may not be a "one size fits all" and it would be great to
have the flexibility to package new types and their operator overloads
so that they can be imported.
Operator overloading alone is not sufficient. With numbers, it is also
nice to have a syntax for literals (like 12.75m in C#).
What is the most advanced proposal on this? There were some hints on
"value class syntax" and "literal suffix support" in a slide deck from
Brendan (www.slideshare.net/BrendanEich/int64 - slides 12 and 13). I
found that very interesting but I don't know if it got any traction.
Bruno
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20170805/ec1e595b/attachment.html>
More information about the es-discuss
mailing list