Hacker News new | ask | show | jobs
by Leftium 1115 days ago
FP didn't really start to "click" until I found "Functional Core, Imperative Shell"[1] last year (2022). The HN comments from that thread were very helpful, too.

I didn't really grok FP until 2022, but I learned Scheme as early as 1999 for programming 101 (comp sci degree). We used the SICP textbook; looking back it seems SICP used an FP language to teach programming, but didn't explore some important FP concepts like Option/Either (a.k.a. Monads. Perhaps our class just didn't cover that part of the book?)

Between 1999 and 2022, I dabbled in FP because I heard good things about it. But I think many FP practitioners could improve their marketing/teaching skills. Most FP texts seem to dive into mathematical jargon (monads, functors, etc) without even explaining why knowing these would be useful.

So I'm writing a series of articles on FP. The first one is on why FP is worth learning: "More Performant, Testable Code with Functional Programming. (FP language optional!)"[2]

The next article will be a curated list of articles/videos that I feel explain FP better than most; the ones I wish I had found way back when starting to dabble in FP.

Also there's an argument many of FP's useful features have been copied by more imperative languages[3]. So people may be unwittingly doing FP even if they aren't using an FP language. For example, anonymous first class functions have been added to C++ and even Excel. JS has always had anonymous first class functions.

[1]: https://hw.leftium.com/#/item/18043058

[2]: https://blog.leftium.com/2023/04/more-performant-testable-co...

[3]: https://youtu.be/QyJZzq0v7Z4