fold and foldRight then?

tirsdag 25. oktober 2016 11.42.00 UTC+2 skrev Wouter In t Velt følgende:
>
> Op dinsdag 25 oktober 2016 02:20:29 UTC+2 schreef Max Goldstein:
>>
>> Changing things makes upgrading harder, invalidates old code, and gives 
>> the larger community the impression that Elm is not stable.
>>
>
> The question is whether different naming for "foldl" and "foldr" would 
> bring enough benefits to be worth all these (temporary) drawbacks.
> So:
>
>    - "foldLeft" and "foldRight" are easier to keep apart/ more readable - 
>    regardless of someone's previous language
>    - "reduce" and ("foldr" or nothing or something else) would be more 
>    familiar to people coming from JS (and possibly other languages too)
>
> My own background is JS, so "reduce" is familiar. 
> But at the same time, I use "foldl" way more often in Elm than I ever used 
> "reduce" in JS, and in very different ways.
>
> What I see as a structural drawback to "foldLeft" and "foldRight" is the 
> length of the function names: shorter names are better, and (for me at 
> least) the extra characters in the function names do not give me any 
> relevant info or benefits.
> 90% of the time I use any fold, my output is the same in both directions. 
> (like .sum or .maximum etcetera). 
> I have never used "foldr" (yet).
>

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to