[Python-Dev] RE: Adding decimal (aka FixedPoint) numbers to Python

Tim Peters tim.one@comcast.net
Tue, 17 Dec 2002 18:03:56 -0500


[Greg Ewing]
> But they're going to have to learn that there's something
> other than decimal in order to understand why they should
> be using this fixed thingy in the first place, instead
> of using floats. I don't think you'll be doing them any
> favours by using terminology that obscures the difference.

We were talking about the name of a hypothetical builtin function, not about
documentation terminology.  If you want to presume that users are idiots as
well as simply ignorant, then fixed_point_decimal() is what you want.
"decimal" leaves out the vital distinction between fixed and floating
semantics, which is more important to "good to the last penny" results than
the distinction between binary and decimal.  A short name simply can't
capture all that's relevant (and I don't care).

> There's a precedent for this in SQL, which has a type
> called DECIMAL. Now, why do you think they called it that
> and not something blander like NUMBER?

You can't take any useful lessons from SQL here.  Most variants of SQL have
both DECIMAL and NUMERIC types, usually aliases, sometimes subtly different.