[Numpy-discussion] [Python-3000] PEP 31XX: A Type Hierarchy for Numbers (and other algebraic entities)
Thu Apr 26 12:11:27 CDT 2007
> Are the base number operations in Python all that difficult to
Well, they're a little tricky.
But the basic problem with "number" support, in almost every
programming language, is that they are too low-level an abstraction.
A number in a program is never *just* an integer or a float. It's
always an integer or float (or complex, OK) deployed in support of a
very specific purpose. It's a loop index, or a weight in kilos, or
the number of calendar entries for a particular day. It often has
units, and a fixed range of values or fixed set of values, neither of
which are taken into account in most programming languages.
Strings really suffer from the same lack of focus. A string is never
just a string. It's a book title, or a filename, or a person's
surname, or an email address. It's usually got a particular human
language (or computer OS) associated with it. Each of these usages
has particular limitations and patterns which limit both its range of
values, and the operations which can be successfully applied to it.
More information about the Numpy-discussion