[Issue 3561] math.abs signature accepts static arrays, but errors internally.

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Tue Nov 3 11:58:32 PST 2015


https://issues.dlang.org/show_bug.cgi?id=3561

Vladimir Panteleev <thecybershadow at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |thecybershadow at gmail.com

--- Comment #3 from Vladimir Panteleev <thecybershadow at gmail.com> ---
Why the heck does abs even need to support static arrays or dynamic arrays at
all? Should other functions in std.math support arrays too, by that logic? E.g.
if abs, why not sin, log, sgn etc.? Just use std.algorithm.map + either
std.array.array or std.algorithm.copy, or heck even std.algorithm.each, to
apply any unary function over any array.

--


More information about the Digitalmars-d-bugs mailing list