This problem has already hit Phobos. We inserted a hack so that sqrt(2) will work. But exp(1) doesn't work. Note that the problems really arise because we've inherited C's rather cavalier approach to implicit conversion.

Classifying 2 as an int was a very wrong start.
This proposal reminds me my proposal on polysemous literals that i had a hard time explaining. (Still, i am not sure if anyone got the point)

Reply via email to