Live data from Hacker News

Ask HN: Explain to me why functional programming is better like I'm stupid

news.ycombinator.com

11–12 of 12 posts

Re: Ask HN: Explain to me why functional programming is better like I'm stupid

#11
post #8

I think your specific question can be answered by this video. It explains how all branching was removed by refactoring an imperative-style function into functional-style. The original code is on the top, the refactored code is on the bottom: https://youtu.be/GyYME8btMHE?t=1473 Besides being shorter and easier to reason about, functional-style can be easier to test because there are fewer logical paths to test (statem…

Thanks for all the sources. It will take me awhile to digest them all.

Re: Ask HN: Explain to me why functional programming is better like I'm stupid

#12

First: You're not stupid. FP advocates sometimes take the stance that you're stupid if you don't use FP, but that's a "them" problem, not a "you" problem. You're not stupid. If they can't explain it to you, either they're lousy at explaining, or FP is as clearly superior as they claim it is. I think that FP matches how some people think - and doesn't match how some other people think. When people that it fits learn F…

That makes sense. I'm thinking for awhile I am just gonna assume my coworker is right and learn how to do it right. Then make another judgement call on whether I like it.
Post reply on HN