[Issue 10670] std.algorithm.reduce: no-seed initialization wrong design

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Jul 19 07:34:44 PDT 2013


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


Peter Neubauer <peterneubauer2 at gmail.com> changed:

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


--- Comment #1 from Peter Neubauer <peterneubauer2 at gmail.com> 2013-07-19 07:34:43 PDT ---
float.init is nan, so this change would require all (float[]).reduce!"a+b"
calls to be rewritten with an explicit seed. I imagine that this is a
relatively common use case, while I've never had to reduce!"a+2b" anything.
Users of the latter case should get the burden of the explicit seed.

-- 
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