Re:Ask HN: Why is functional programming not more popular?
by p1esk on Tuesday November 05, 2019 @10:25AM
(#21453159)
Because no one can clearly explain the advantages of FP. Not “in theory”, but using commonly used practical tasks. I don’t care about immutability unless it clearly makes my life easier and so far I got by just fine with non-FP style of doing things. The only valid argument I heard is “it expands your mind as a programmer”. Yeah, whatever.
[ Parent
| on HN ]
Re:Ask HN: Why is functional programming not more popular?
by girishso on Tuesday November 05, 2019 @01:39PM
(#21455279)
> it expands your mind as a programmer
That’s exactly what got me interested in FP. But after doing some serious work in FP, I must say typed FP really does help keep my mind more saner, knowing nothing’s broken in the product, with my changes here and there.
Of course, TDD helps in OO/imperative languages, but with typed FP you get that almost for free.
Re:Ask HN: Why is functional programming not more popular?
by valand on Tuesday November 05, 2019 @08:19PM
(#21458816)
The last part really captures how TypeScript saved me from headaches. :D
Re:Ask HN: Why is functional programming not more popular?
by girishso on Tuesday November 05, 2019 @09:34PM
(#21459206)
When I said typed FP, I meant languages with ADTs.. Elm/Haskell etc., not Typescript! :)
Re:Ask HN: Why is functional programming not more popular?
by valand on Wednesday November 06, 2019 @01:37PM
(#21465540)
I thought we were talking about FP paradigm, not the language, and the Typed data concept which includes compile time type validations, type inference.
And also I'm pretty sure TypeScript has union, intersections, tuples, record which are pretty much ADTs.
Re:Ask HN: Why is functional programming not more popular?
by girishso on Wednesday November 06, 2019 @08:07PM
(#21469436)
You're right, my bad. I didn't know TypeScript had ADTs. Should probably take a serious look at TypeScript.
Re:Ask HN: Why is functional programming not more popular?
by 0_gravitas on Tuesday November 05, 2019 @03:47PM
(#21456516)
immutability has absolutely made my life easier, effectively knowing that at all times "if i perform this operation here i know for a fact that im not going to bork anything anywhere else"