News for hackers. Stuff that matters.
Re:Ask HN: How to be fluent in functional language speak? by jolux on Tuesday May 05, 2020 @05:49PM (#23085489)
Generally in FP, “elegant” == simpler.
Re:Ask HN: How to be fluent in functional language speak? by searchableguy on Tuesday May 05, 2020 @06:02PM (#23085611)
On that, I have seen lot of TypeFunctorMapMutatorKeywordsBeingImported to shorten the code and make it elegant...of course from the standard library or modules.

When you could have written it yourself with one or two extra lines. Why? Is it simpler? Or is it unnecessarily abstracted?

Re:Ask HN: How to be fluent in functional language speak? by jolux on Tuesday May 05, 2020 @06:06PM (#23085653)
I mean, that’s on a case by case basis. I personally tend to do most of my FP in OCaml and F#, which have less of the tendency towards infinite abstraction that people sometimes accuse Haskell programmers of. I don’t think the approach you describe is elegant, but this is highly subjective.
Re:Ask HN: How to be fluent in functional language speak? by chowells on Tuesday May 05, 2020 @06:08PM (#23085675)
1. It's code reuse. Don't rewrite code that's already written.

2. It's harder to understand. "Why didn't this use the standard library function? Is it doing something different? It doesn't look like it, am I missing something?"

Re:Ask HN: How to be fluent in functional language speak? by jolux on Tuesday May 05, 2020 @06:16PM (#23085753)
It’s definitely not _always_ just about code reuse, particularly when you start really stacking GHC pragmas and such.