|
From: Ethan M. <merritt@u.washington.edu> - 2005-09-23 18:34:46
|
On Friday 23 September 2005 07:19 am, Robert Hart wrote: > > Yes, but we are talking about a situation where floats *do* apply. > Surely it is more logical to treat numbers as floats *unless* they are > used in a context where only integers apply. For any ambiguous case > (division and exponentiation), anybody who wants the integer math > *knows* they want it and can use int() I happen to disagree. Integer arithmetic is quite useful in many contexts, and it is a standard part of programming languages and natural languages. Adding peculiar arithmetic operators to indicate that a number is an integer strikes me as being an obfuscation, not a clarification. Sure, sometimes even an experienced user will forget, and mistype (n/2) where it should have been (n/2.0). But also people type "if (a = b)" where it should have been "if (a == b)" or "if (a eq b)". Hiding this useful distinction in a choice of operators is not likely to reduce the number of mistakes. -- Ethan A Merritt merritt@u.washington.edu Biomolecular Structure Center Mailstop 357742 University of Washington, Seattle, WA 98195 |