Floating point rounding modes: we should restrict them slightly
Walter Bright
newshound1 at digitalmars.com
Sun Sep 13 17:39:24 PDT 2009
bearophile wrote:
> An important purpose of a not bug-prone language is remove as many
> undefined situations as possible.
That's right.
> If you add that to D2 specs, can
> the compiler catch at compile time all cases of violations to that
> rule?
Unlikely. But that has to be weighed against the former behavior being
defined in a useless way.
> D has something for the actions that must be done before the function
> exits, the scope(exit). Can something like that be used to
> automatically avoid undefined rounding situations?
Using an RAII object to do it might be better.
More information about the Digitalmars-d
mailing list