On 03/05/2014 06:04 AM, Steven D'Aprano wrote:
(By the way, I think it is somewhat amusing that Python not only has a built-in complex type, but alsosyntax for creating complex numbers, but no built-in support for exact rationals.)
That is interesting.
I think Mark is correct in unifying numbers. And also adding in decimal features. The way it should actually be done is another thing. But having an up to date package that can be used is a very good start. (Thanks Mark!)
Mark describes an AI approach,, which I think he means having a internal representation that may change as needed depending on how a number can best be stored and calculated while still keeping it's accuracy.
Weather or not that approach is called Decimals is another thing. It might be called "Unified Numbers".. or just Numbers.
The point is for the internal representation to be an implementation detail the user doesn't need to worry about. And have Decimal features available by default.
If things are decided by use case, then I can't even think of a good enough argument against having decimal features available by default. The financial use cases are that overwhelming.