That said, it's all subject to Evan's approval.
Normally I'm opposed to syntax or name changes. But I think this or some variation is a good idea. (Maybe foldl becomes fold, since it's usually the one you want.)
That said, it's all subject to Evan's approval.
--
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 elm-discuss+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
-1 from me. foldl and foldr are so commonly in use in other functional languages that they are an acceptable short hand. Who cares what Scala does.
On Oct 20, 2016, at 9:12 AM, Robin Heggelund Hansen <skinn...@gmail.com> wrote:In Elm 0.18, primes are being removed as valid characters in a variable/function name.
It really comes down to what Evan wants to do. People come to Elm from many languages, and everyone has preferences. Changing things makes upgrading harder, invalidates old code, and gives the larger community the impression that Elm is not stable.
It really comes down to what Evan wants to do. People come to Elm from many languages, and everyone has preferences. Changing things makes upgrading harder, invalidates old code, and gives the larger community the impression that Elm is not stable.
Changing things makes upgrading harder, invalidates old code, and gives the larger community the impression that Elm is not stable.
fold and foldRight then?
I agree with your sentiment in principle. I suppose the underlying question is whether or not this is actually going to be such a benefit to future users of elm that it would be worth inconveniencing current users who want to upgrade. Personally I'm quite comfortable with foldr and foldl but I understand the foldLeft and foldRight are more expressive.
I agree with your sentiment in principle. I suppose the underlying question is whether or not this is actually going to be such a benefit to future users of elm that it would be worth inconveniencing current users who want to upgrade. Personally I'm quite comfortable with foldr and foldl but I understand the foldLeft and foldRight are more expressive.I used to use ember and its constant churn drove me to find an alternative which led me to elm. Not that the community elm behaves anything like ember in this regard, but still this blog post rather sums up the danger of making a lot of inconvenient changes for apparently abstract reasons.
In the same spirit, I propose that we change the name of foldl to foldLeft, and the name of foldr to foldRight. The difference between foldl and foldr isn't to spot at a cursory glance. foldLeft is also more self-describing than foldl, it also matches what I say when I read foldl aloud while explaining code to others.
Also worth pointing out that these libraries (and possibly others) have adopted the convention of using a single 'l' or 'r' to mean from-the-left and from-the-right:
--
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 elm-discuss+unsubscribe@googlegroups.com.