> The reason being that I believe the words better matches what the construct does.
To me, `case x of` conveys *what* the construct does. It says, handle all the different cases/scenarios/possibilities of `x` as follows. Ties in nicely with the compiler msg: "You haven't handled these cases of this type". `match x with` conveys *how* it does it. I'm going to match `x` with some destructured patterns below but it says nothing about what those patterns are so we are losing the intention of the construct imo. In some crude sense, it would be like renaming `List.map` to `List.turnAintoB`. The former is more about intention, the latter about implementation. On Friday, 21 October 2016 01:06:53 UTC+11, Robin Heggelund Hansen wrote: > > First of, I would like to say that for me personally, this proposal > doesn't matter. > This proposal is written because I believe people with little to no Elm > experience will understand the construct better. > > The proposal, as the title of the post suggests, is to rename the > "case..of" expression to "match..with". The reason being that I believe the > words better matches what the construct does. As a non-native English > speaker, case..of doesn't immediately make sense. However, match..with > makes perfect sense. > > Match..with is what the same construct is called in F#, so it has that > going for it. > > Case..of to match..with renaming could be handled by elm-format. > > As said, to me personally and, I believe, other seasoned elm devs, this > won't matter that much. > The question therefore becomes, how big of a difference will it make to > new and future elm developers? > -- 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.