www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 10369] New: Floating point comparisons deprecation, and later removal

http://d.puremagic.com/issues/show_bug.cgi?id=10369

           Summary: Floating point comparisons deprecation, and later
                    removal
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: bearophile_hugs eml.cc


--- Comment #0 from bearophile_hugs eml.cc 2013-06-15 15:33:05 PDT ---
As part of the efforts of cleaning up detritus accumulated the D language (as
Issue 10326, Issue 10321, Issue 10320, Issue 10318), maybe it's better to
deprecate the floating point comparisons in D2 soon (like in dmd 2.064):

http://dlang.org/expression.html#floating_point_comparisons

The idea is to give a deprecation message for all the following operators, and
one or two DMD versions later they should become errors (leaving them only in
D1 compiler code paths):


void main() {
    double a = 1.0;
    double b = 2.0;
    double r;
    r = a !<>= b;
    r = a <>   b;
    r = a <>=  b;
    r = a !<=  b;
    r = a !<   b;
    r = a !>=  b;
    r = a !>   b;
    r = a !<>  b;
}


(Regarding built-in operators, for a scientific programmer I think a standard
operator overloading for a second kind of multiplication is useful. Maybe
something like ".*").

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 15 2013