Comment on PEP-0238

Donn Cave donn at u.washington.edu
Tue Jul 3 15:49:38 EDT 2001


Quoth Paul Prescod <paulp at ActiveState.com>:
...
| Nobody argues against understanding. But understanding is eased if you
| do what people expect. People believe that the integers are a special
| case of floats. Python encourages them in that belief in most places
| other than this one.

Integer is not a special case of float, they're both special cases
of number.  Why not say integers are pure numbers and floats are
corrupt, hence coercion favors the float because you can corrupt
the pure easier than you can purify the corrupt?  As far as I'm
concerned that's as reasonable.

I don't know what people believe.  This morning's paper says some
significant fraction of American teenagers suppose that tomorrow
we'll celebrate our independence, gained in 1776, from ... France!
Does it matter what they believe?  Who cares what people think
about Python, unless they're going be able to do something useful
with it.  Those people can learn.  Integer arithmetic is useful.
They should learn it.  Floating point is just a can of worms.

Maybe there should have been a "div" operator in Python, but it
strikes me as rather monomorphic (antonym of polymorphic?) unless
we have a more general notion in mind than just integer arithmetic.
But it's awfully late for that anyway.

	Donn Cave, donn at u.washington.edu



More information about the Python-list mailing list