[Issue 8755] Change the order of reduce arguments

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Mar 21 05:08:06 PDT 2014


https://d.puremagic.com/issues/show_bug.cgi?id=8755



--- Comment #20 from monarchdodra at gmail.com 2014-03-21 05:07:58 PDT ---
(In reply to comment #18)
> What I don't like is to give only 1 single scalar argument if you have N
> functions and then implicitly multiply the single seed N times. Similar
> implicit behaviours look handy, but they make the code less clear, and later
> usually they find some way to bite your rump.

I've already agreed to that point, and will be removing the functionality.
Furthermore, I doubt it provides any real feature: We never call reduce with so
many functions that this would be justified.

> On the other hand I think that it's uncommon to give more than one function to
> reduce/fold. So this whole sub-feature is could even be chopped away,
> simplifying fold.

When you say "sub-feature", are you talking about about the "1-seed" thing, or
having multiple functions/

If it's multiple functions, then I have to say that it's an opt-in feature, and
it works anyways. It's not actually complicated to implement, and it buys us
nothing to remove it. Why want to chop it? I've used it before. It's nice.

If it's the single seed for multiple functions, yeah.

> How many real usages of multi-function reduce to you have in Phobos?

I'm not sure it's a fair reference, because Phobos doesn't "do" anything, it
just provides function. I'd be willing to bet there is a fair amount of it
being used out there.

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


More information about the Digitalmars-d-bugs mailing list