6 ms·
> "Not better in any significant way" is a hot take, and pretty hand-wavy way of dismissing a whole group of languages. With so many people preferring that synt
by kerkeslager 4y ago
> "Not better in any significant way" is a hot take, and pretty hand-wavy way of dismissing a whole group of languages. With so many people preferring that syntax, it might just be that you're actually wrong..
I can see how it could be interpreted that way if you didn't read anything else in my post.
A lot more people use C syntax than use ML syntax, so your own argument, "[w]ith so many people preferring that syntax", would support C not ML.
> For instance, I'd say the piping is significantly better than the backwards reading of nested function calls you have to do in Python.
> Data |> map |> filter |> group |> sum
> Vs sum(group(map(a) for a in data if filter(a)))
That's not coherent Python syntax, but knowing both languages, I'll agree that the ML syntax is definitely better. But significantly better? Reading that sort of code in Python simply isn't a problem I run into. Neither syntax solves any problems I have, because understanding syntax isn't ever the problem I have (in languages that aren't intentionally opaque).
Incidentally, if you want that sort of thing in C-ish syntax, it's not hard to get it in (for example) C#:
data.map(f).filter(p).groupBy(g).reduce(add);