[Issue 10369] New: Floating point comparisons deprecation, and later removal
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Jun 15 15:33:06 PDT 2013
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 at puremagic.com
ReportedBy: bearophile_hugs at eml.cc
--- Comment #0 from bearophile_hugs at 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: -------
More information about the Digitalmars-d-bugs
mailing list