Post by jacob navia
What is the good solution?
If I were designing the language, I would have treat unsuffixed real-number
values as a compiler-only type which would, when combined with any other
floating-point type, be subjected to balancing promotion with that type.
If `r` is an extended-precision floating-point type, cases where a programmer
would want to multiply `r` by 3602879701896397/36028797018963968 are apt to
be far less common than those where a programmer would want to multiply by
the extended-precision value nearest 1/10, so having the shortest
representation (r*0.1) represent the case which is very seldom wanted but
very likely to be used accidentally would seem unhelpful.
While compatibility with existing code would probably be necessary to make
unsuffixed literals balance to at least "double", I see little benefit to
having them rounded to "double" when used in operations with larger types.
If suffixes were only necessary in cases where the programmer wanted to
perform an operand between a value of one type and a constant of another,
the use of suffixes in those cases would improve legibility rather than
adding visual clutter.