4 ms·
Functional programming is dead. It never really caught on. For all the articles I saw from 2010 - 2020, functional languages are still as niche as ever. Influen
by ldjkfkdsjnv 2y ago
Functional programming is dead. It never really caught on. For all the articles I saw from 2010 - 2020, functional languages are still as niche as ever. Influential languages like scala have their best functional features pulled into java. LLMs will further accelerate the decline. All the highest quality, most crucial software I have seen is written in something like Java, using classical OOP design patterns.
- TwentyPosts 2y agoCounterpoint: Rust. Seems to be taking off (difficult to predict the long-term, of course), but Rust is excellent at functional paradigms and Brings many advancements of functional languages to the people.
- ldjkfkdsjnv 2y agoRust is still extremely niche, large scale mission critical software that runs big tech is not written in Rust
- rcxdude 2y agoit's getting built into some pretty widepread applications: firefox is a big one, it also runs a lot of the super-low-level parts of dropbox. I'd say it's overtaken haskell for adoption at least.
- SoftTalker 2y agoBecause it's really better, or because it's trendy?
- chuckadams 2y agoIt's more practical. I love me some Haskell, but you're never going to write Servo in it.
- TwentyPosts 2y agoLinux Kernel, Firefox, Dropbox, Discord, Cloudflare, Windows, AWS. Idk, looking pretty good to me, unless you think none of these count. Considering everyone seems to hate C++ nowadays, and Rust looks like the only existing alternative. Hard to imagine the trend won't continue.
- akira2501 2y agoRust? Why not just JavaScript? It's far more functional than Rust and is much more widely used and deployed.
- ovyerus 2y agoJS is really good at FP, but it doesn't have any real concept of function purity and isolating side effects. Rust has constant functions, for one: https://doc.rust-lang.org/reference/const_eval.html https://doc.rust-lang.org/reference/const_eval.html
- akira2501 2y agoDoes rust actually have pure functions? Also, I'm suspicious of the claim that compile time evaluation makes the language functional.
- TwentyPosts 2y agoCalling them 'pure' may be incorrect depending on how high your standards are. Rust functions (which don't take mutable references) are incapable of modifying anything you pass into them, and any sort of global state is heavily discouraged. This is pretty good as far as "pure" goes, but of course, they can perform I/O. (Then again, without any side effects a program would do nothing at all behind heating up your CPU, so this seems like a fair trade-off.) What makes Rust functional are the patterns you can use in the language, though. A lot ot of maps, a lot of filters, a lot of iterators and algebgaic data types and pattern matching.
- juunpp 2y ago"Most crucial software I have seen".
- ldjkfkdsjnv 2y agoAt big tech firms, there is no FP in the big crucial systems
- theCodeStig 2y agoMeta, Jane Street, IO Global, Standard Chartered Bank
- Waterluvian 2y agoI’ve seen the complete opposite. So much total OOP nonsense in Java. You know what I think it means? That no single perspective will ever be sufficiently complete to offer a meaningful opinion of the whole.
- koolala 2y ago[flagged]
- fifilura 2y ago> Influential languages like scala have their best functional features pulled into java. Here I feel you contradicted yourself, because the functional patterns are making its way into mainstream languages. Also, functional patterns has its special use in distributed/parallel programming.
- vendiddy 2y agoReact is a functional pattern and is pretty popular.
- akira2501 2y agoDoes it's popularity come from it's functional foundations or just because a billion dollar corporation keeps it up to date?
- vendiddy 2y agoMy response was to the "FP is dead" comment. It's not dead. IMO React was a lot simpler to reason about than any of the competing frameworks at the time. It's a function that takes data and outputs a UI. If the data changes, the function is re-run. How did React beat EmberJS (LinkedIn) and Angular (Google)? Marketing budget may be a factor, but "because billion dollar corporation" is not a conclusion I would draw.
- int_19h 2y agoOn the contrary, functional programming is mainstream. Even C++ and Java have had lambdas for many years now, higher-order functions are a common API pattern in all mainstream languages, C# and Python have pattern matching these days. Rust has ADTs even. Pure functional programming didn't catch on, but most FP was never pure.