Glad this didn't happen. Also it's weird to me to equate functional & dynamic like that.
Glad this didn't happen. Also it's weird to me to equate functional & dynamic like that.
Except for the spread of Javascript. No one said backend JS would be a thing.
What people don't realize is that functional programming is mixed martial arts. The art of combat brought down to the science of combat. I think there is little chance FP will become mainstream. MMA didn't become popular because it was the most effective art, it became popular because it was packaged up into entertainment.
That's probably true.
> I think there is little chance FP will become mainstream
That's demonstrably not, as React has basically gone full FP. I would argue that the majority of bootcamp students are now taught functional programming.
You could claim erlang isn't full fp because you have a stateful process attribute dictionary, and, while we're at it, access to network resources like a Postgres database, but that would be an almost meaningless statement.
With Hooks, react basically went full FP. You can still make an object component, but it is frowned upon.
function closedFunctionThatdoesSomeImperativeAlgorithmWithMutatingInternalState(x: number): number
Right? This is totally legal and not even a niche use case so you can do whatever the hell you want in react. It's the interface to the framework that is supposedly FRP. This is NOT the case for most functional languages.Also if you think all FP is just immutable state then you don't see the full picture. Immutable state creates an isomorphism between imperative programming and functional programming. Thus many bootcampers following the buzz end up just making all their variables immutable and thinking they figured it all out.
Yes, immutability forces the usage of higher order functions and recursion. This surface level knowledge also doesn't really provide any intrinsic benefit to programming. Recursion, map or reduce is not intrinsically better than a for loop or a while loop. Most of these beginners just subconsciously obey the buzz without ever realizing that that the buzz makes no sense. These guys don't even know what "function composition" means.
Because most of these programmers don't understand why FP is better, they don't use it properly and as a result this popularity of FP among react users is just a fad. Definitely not mainstream.
It is a fad because FP issues new foot guns to blast your head completely off. FP without types and without understanding isn't a huge improvement over procedural programming or OOP.
You're already hearing about programmers not buying into the whole FP fad largely because of there experience with FP on react and other similar platforms.