Hacker News new | past | comments | ask | show | jobs | submit login

I'm going to take inspiration from @lexi-lambda and respond in mini-composition form. Note that great writers write essays. I, write compositions.

It's just like Haskell for the crucial difference between two functions to be denoted by prime. For half of the essay I thought that this was a deep philosophical treatise about the degenerate case equality of lazy and strict languages. But, in reality, fold and fold-prime (can you inline code in HN?) are totally different functions.

And like with all pairs of things in Haskell once you learn the fundamental difference between them, the fact of that difference becomes obvious. So obvious that you don't know how anyone could possibly confuse the two. And so you call the method everyone should use foldl-prime even though a casual programmer doesn't even know that "single-quotes" are an acceptable value name. When you could have just called it foldl and moved the old one to the deprecated module.




This seems like a weird complaint - basically everywhere in programming two variables/functions/classes/etc with different names are different things. I'd be much more surprised if appending a ' to a function name did nothing in haskell.

> When you could have just called it foldl and moved the old one to the deprecated module.

1. Most people aren't a fan of randomly changing existing library functions

2. The lazy (non-prime) version of foldl isn't useless! There's even a section at the end of the post explaining how this post _only applies to lists_ and that with other data structures foldl and foldr' are actually useful.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: