Settings

Theme

Functional Programming? Don’t Even Bother, It’s a Silly Toy

functional.works-hub.com

4 points by dbnotabb 6 years ago · 3 comments

Reader

codedrome 6 years ago

I think the controversy and confusion about functional programming stems from the difference between procedural and OOP programming. The switch from procedural to OOP which occurred in the 1990s was basically all or nothing - with the languages of the time, mostly C++, it was a full paradigm shift.

People probably assume it's the same with FP, ie you have to do EVERYTHING as FP whereas in fact with current mainstream languages (eg JS, C#) you can just drop in bits of FP whenever you feel it is appropriate. It's a tool in the toolbox, not the entire toolbox.

PaulHoule 6 years ago

I will say working with JDK 8 I often start out with objects that implement interfaces such as Function and Consumer, but pretty soon I end up adding more methods and I am back in the OO world.

A particular weakness w/ type erasure in Java is that you can only implement a Function<A,B> and if you want to bundle closely related functions together into an object you can't also implement Function<C,>.

dmt314159 6 years ago

posted at least 5 times over the past 4 days

some responses treat as serious, others consider clickbait

https://news.ycombinator.com/item?id=20592774 https://news.ycombinator.com/item?id=20582004 https://news.ycombinator.com/item?id=20565024 https://news.ycombinator.com/item?id=20561136 https://news.ycombinator.com/item?id=20554229

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection