First, Java 7 allows you to include String ... and C # values. (And in Java, you cannot enable long ... thanks for reminding me of Peter.)
However, the reason why the prohibition on including float and double unacceptable is most likely that the insidious effects of rounding errors and inaccurate representations of floating point numbers will make code that uses floating point very error prone. or special syntax is required to express error bounds in case values.
Now, if there were many good use cases for including floating point values, one would expect some language to support this. But, as far as I know, there is no programming language in the world that has ever followed this path.
Stephen c
source share