Against PEP 240

Terry Reedy tjreedy at home.com
Wed May 30 12:26:35 EDT 2001


My reactions to the discussion so far:

If more of our distant ancestors had excluded their thumbs when counting,
base 8 would have won out over base 10, and we would not have the problem
leading to this discussion.  (And counting with the 16 'little' digits
might  have been even better.)  But we are stuck in this grandaddy of
path-dependent lockins, which has bedeviled comp sci since the beginning 50
years ago.  No solution is going to satisfy everyone.

I am sympathetic with the desire of some not to change the meaning of
something so basic as a literal, and its current time/space efficiency.

I an increasingly sympathetic to the desire of others that decimal literals
actually mean what they appear to, and to avoid other types of surprises.
I strongly suspect that a decimal rather than rational representation and
arithmetic is the better alternative to binary floating point.

If and when an alternative is developed, I think this is one place where
programmers should be able to could choose the interpretation they want.
This can be done either when compiling the interpreter (from C source) or
within the interpreter when compiling Python source (with an
as-yet-to-be-developed option mechanism).  I would hope that making this
choice be supported in the official distribution.  This third way of
catering to both desires should only dissatify those opposed to options
either in general or here specifically.

I wonder why we do not have (widespread, standardized) decimal FPUs as well
as binary FPUs, which would push to extra overhead to the lowest level
possible and give a pan-language solution.

Terry J. Reedy






More information about the Python-list mailing list