[Issue 6154] std.math.abs on std.complex numbers too
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Jun 14 11:08:22 PDT 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6154
Don <clugdbug at yahoo.com.au> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |clugdbug at yahoo.com.au
--- Comment #3 from Don <clugdbug at yahoo.com.au> 2011-06-14 11:03:40 PDT ---
(In reply to comment #2)
> (In reply to comment #1)
>
> > auto m2 = map!`a.abs()`(array2);
>
> Right. But std.math.abs has to work on complex numbers too, as before,
No, it does not, and will not.
BTW that approach would lead to executable bloat.
> for polymorphism, and for a serious integration of complex numbers in Phobos.
No. This is what overload sets are for.
Complex must not be given special treatment ahead of user-defined types.
Otherwise, user-defined types become second-class citizens.
(std.math.abs is a bit of a problem at the moment, there are a couple of
functions in std.math which have range versions, which IMHO have no business
being in there).
--
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