Detecting inadvertent use of integer division
bearophile
bearophileHUGS at lycos.com
Mon Dec 14 04:18:57 PST 2009
Don:
> In the opPow thread there were a couple of mentions of inadvertent
> integer division, and how Python is removing this error by making /
> always mean floating-point division, and introducing a new operator for
> integer division.
In Pascal too (and OCaML, but the situation is different) they are separated. I think here having two operators is better, Niklaus Wirth was right again (but I don't know if D can grow another division operator, it's unlikely).
Bye,
bearophile
More information about the Digitalmars-d
mailing list