I feel quite strongly that max/min, ||/&& and string should stay.  I would 
argue that one benefit of doing things the "traditional" way is that once 
new programmers get used to it, they get a lot of mileage when 
transitioning to or working with other languages.  Polyglots are valuable 
and the easier it is to be a polyglot the better.

With 'filter', I have never really had a problem remembering which way it 
goes -- maybe that is because I also work with scala.  Personally I prefer 
List.contains over List.includes, because for some reason the latter 
suggests the math operation "is a subset of" rather than "is a member of". 
 Though I could also see how List.contains could evoke the "is a subset of" 
operation.  I don't feel strongly about this particular one.

Maybe its my scala background again, but reduce and foldl are different 
concepts to me.  For a fuller discussion, please see:

http://stackoverflow.com/questions/7764197/difference-between-foldleft-and-reduceleft-in-scala

In scala, reduce works with the base type of the list, requires no default, 
and requires a non-empty list.

Elm's foldl (like scala's foldLeft) works with an empty list, requires a 
default, and can work with types identical or unrelated to the base type of 
the list.

Renaming Elm's foldl to reduce will make it slightly harder to learn the 
differences between scala and elm, and unnecessarily increase the friction 
of rapidly transitioning back and forth between those two.  I strongly 
recommend against dropping foldr -- the two of them have different uses. 
 Maybe similar arguments
can be made by people with a haskell background as well.


On Thursday, July 14, 2016 at 12:34:45 AM UTC-4, Max Goldstein wrote:
>
> It's great that Elm can appeal to new programmers, but it's mainly 
> targeting web developers. As such, things like max/min, ||/&&, and "string" 
> are going to stick around. No need to reinvent what's been standard(-ish) 
> since C.
>
> The biggest name annoyance, IMHO, is *filter*. It doesn't immediately 
> convey whether you're selecting in or out. For my money, Ruby got this one 
> right: *select* and *reject*. They sound similar and they are similar, 
> and the names convey which way the predicate goes. I wouldn't be adverse to 
> stealing a few other Ruby or near-Ruby names; perhaps List.includes instead 
> of member, and reduce to replace foldl (dropping foldr and renaming it fold 
> could also work).
>
> That said, I'm not convinced much of this will happen. Evan is a "big 
> picture" guy, and this would break a lot of code, although deprecation 
> (having both copies for awhile) could help.
>

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