PROPOSAL: Implicit conversions of integer literals to floating

bearophile bearophileHUGS at lycos.com
Thu Dec 30 09:38:25 PST 2010


Don:

> No. People expect sqrt(2) to compile, and to return 1.414....

Then people probably need to use sqrt(2.0) or sqrt(cast(double)2).


> For example, it works in C and in C++.

And maybe it doesn't work in OCaML.

Bye,
bearophile


More information about the Digitalmars-d mailing list