Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Your FP example reminds me of the JS trend that picked up about 5 years ago. Not sure if they're still doing it, but you described the dogma near perfectly.


Because imperative programming in Javascript, even with OOP principles and patterns, generally leads to even more complexity and messiness.

FP is now almost the norm in frontend engineering. Certainly in the React world. Immutability and side-effect-awareness is highly valued.


Thé irony being that JavaScript doesn't add anything that Smalltalk didn't already provide, yet we have all this OOP backslash and how FP is somehow better.


Well, Javascript is the language that is able to run everywhere, so that's what frontend engineers have to target. There is some more flexibility now with Webassembly...

If you are interested, look up Fable, Bolero, Elm, PureScript, ClojureScript, Grain...


All of them don't wash away JavaScript semantics, just because the source language is something else.


That's actually not true, at least if your definition of "Javascript semantics" isn't extremely broad.

This was the case with CoffeeScript. But the examples I gave either work with Webassembly (Grain, Bolero), providing their own runtime, or do some work to hide Javascript's data model to a large degree (F#, Purescript, ClojureScript).

What stays the same is that you are dealing with the DOM, User events occurring there and a metric sh*t ton of asynchronous APIs.


Yes, that's exactly what I was getting at. It was less a criticism of FP (which is why I say it feels like it might be - it's not) and more a criticism of the bevy of techniques common in modern full-stack development.

Even then I'm not saying it's bad to do thing that way. They absolutely have their place. OOP has its place. FP has its place. Distributed computing has its place and vertical scaling has its place. The point is, dogmatically latching onto "X bad! Y good!" blinds you to potential solutions.


Do you mean Redux? If yes, it's still quite popular




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: