Rational Numbers
Nick Maclaren
nmm1 at cus.cam.ac.uk
Sat Jan 13 04:59:49 EST 2007
In article <pan.2007.01.13.00.22.45.142174 at REMOVE.THIS.cybersource.com.au>,
Steven D'Aprano <steve at REMOVE.THIS.cybersource.com.au> writes:
|> >
|> > Some of the algebraic languages. (2/3)^(1/5) is held as such and
|> > manipulated appropriately.
|> >
|> > Yes, I know that's "cheating" :-)
|>
|> I see your smiley, and I still don't understand. Why on earth would you
|> call it cheating for a language to have a data type that is suitable for
|> the data being used? Maybe it's a form of humour I don't get -- like
|> pointing at a car and saying "Look, a cow!".
Oh, because it's not a proper data type! The data type is an expression,
and is held in a structured form, of which such powers may be one level.
This is better regarded as an optimisation of a common case than a true
data type. Now, there MAY be such a language that supports such things
as a proper data type, but I don't know of one.
Regards,
Nick Maclaren.
More information about the Python-list
mailing list