Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The linked comment is great. However, I think the HN heading is confusing, particularly for people who may not know about the existence of Haskell and its lazy-by-default semantics.

The linked comment recommends using strict/eager fold-left instead (`foldl'` in Haskell) of using lazy fold-left (`foldl`, with no trailing apostrophe). It's not saying that you shouldn't use fold-left in any language.

Reading the HN title alone, in its front-page context, it looks like it's saying that it's the fold-left generic operation that's wrong for lists, and not just `foldl`, Haskell's default lazy implementation of fold-left. Paradoxically, following the guidelines and re-using a boiled-down version of the linked comment's first line results in the line being misleading and/or link-bait (I guessed what it was about, but I still had to go and check).

For some time I've thought that the HN policy of disallowing editing of post titles, while correct, can be taken too far, and that many titles would be better with some annotation.

In this case, "It never makes sense to use [lazy] foldl on lists [in Haskell, use foldl' instead]" would be a better title. A bit awkward and maybe inelegant, but it says what the article means. Out of its original context, the HN title doesn't say what the posted article means.

Maybe "Lazy foldl versus strict foldl' in Haskell" would have been an even better title, if the guidelines allow for using one's discretion on when to disregard them.

Other common case is that of headlines in the first person: "My X ..." would often be improved by editing it to "[Name's] X ..." or "[Name of whatever X is] ..." while leaving it otherwise unchanged.

--

I don't know if @sama will get summoned to this comment like he would if this were Twitter, but it doesn't hurt to try.



The OP mentioned in another reply that their submitted title did include a (in Haskell) at the end, and it was dropped (automatically?)


> and it was dropped (automatically?)

I don't think HN automatically drops title items. Mods edit them. Mods regularly edit them to be significantly worse, because they'd rather the title exactly match the "article's" than the title being useful in and of itself.


How counterproductive.




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

Search: