8 ms·
Exactly. Functional programming has been around for quite a while, it just recently became the FAD of the day, just search youtube for "functional programming i
by mm007emko 4y ago
Exactly. Functional programming has been around for quite a while, it just recently became the FAD of the day, just search youtube for "functional programming in javascript". This will fade away in just a couple of years.
F# is an interesting language and yes, I used it at work a couple of times. However finding a programmer who is into that is hard and the HR "partners" will kill you because people like these can't be treated as cheap replaceable resources. So it was F# prototype -> C# production. Attempts to introduce a new language or a tech stack usually failed because the decision makers (managers) were concerned about "how many people can I hire within a month" than anything else - nobody was fired for picking Java, C# or JavaScript (TypeScript) for the next project and staffing accordingly.
Languages like OCaml, Haskell, Lisp (whatever flavour you pick) or Prolog will never become mainstream. Should they even? My favourite is one of them for my general hacking or research projects; not sure I'd like to use it in a corporate job (which I have right now). Small efficient team in a tech start-up? Hell yeah! Mainstream mundane programming? OMG NO! Horses for courses. Hearses are not mainstream vehicles yet all of us will need a ride in one occasionally. Does it mean they should become popular and mainstream? :-D
- nouveaux 4y agoFunctional programming is not just the FAD of the day. This is evident by the strong presence of functional programming in Rust, an imperative language. Functional programming is also the foundational idea behind React. As with most things in life, extreme ends of the spectrum rarely pan out. Pure functional programming languages are harder to work with but functional programming has a ton of merit. It's here to stay. Regarding Ocaml, the functional aspect of the language is not hard. I have trained several junior programmers to write code in it (ReasonML). It is not a pure functional language. The biggest challenge for most people is dealing with types. Ocaml's standard library is a huge sore point. It also lacks a lot of proper tooling. The biggest problem with Ocaml/ReasonML is that they are unable to rally everyone to a unifying vision to gain traction.
- Kototama 4y agoThe alternative Base/Core from Jane Streets looks good though. Of course it splits the community but the work done on it is very good.
- occamrazor 4y agoThey’re great, but Base is new(ish) and not complete and Core is Linux only (maybe it work on OS X too?)
- rbjorklin 4y agoThe Unix bits were broken out of core earlier this year, it’s now multi-platform. https://discuss.ocaml.org/t/ann-v0-15-release-of-jane-street-packages/9612 https://discuss.ocaml.org/t/ann-v0-15-release-of-jane-street...
- occamrazor 4y agoThat’s great to hear, I missed that update (still on 0.14).
- deleted 4y ago[deleted]
- mm007emko 4y agoI dare to disagree - I still think that functional programming is a FAD of the day right now. Like object oriented was the FAD of the day in the 1990s and many then procedural languages saw OOP extensions on top of them (Perl where you need a bless() to work with an object? :-D ) and some even were like "yeah everything is an object so let's wrap every procedure into a class and use Command Pattern instead of closures and build a Kingdom of Nouns where people will name their classes after design patterns and everything will be perfect with a cup of hot Java"). Nowadays C++ has closures. What will become the FAD of the day in 10 years? Will wee see embedded Prolog in C# 12 or C++31? Who knows? Like OOP has been with us since 1968? and hasn't disappeared anywhere, functional programming features will not disappear from mainstream languages. But the "cool new shiny silver bullet" will be something else. Like Simula-68 and Smalltalk-80 paved way for OOP, Haskell and OCaml (et. al.) have been paving way for functional programming and Prolog and Datalog have been paving way for logical programming. They won't become mainstream when logical programming becomes the FAD of the day. BTW you mentioned you taught a couple of junior programmers an ML-ish language. That's awesome! We all (programming community) need more legends like you.
- wk_end 4y agoJust a heads up: the word "fad" isn't an acronym, there's no need to capitalize it (and it looks strange to) the way both you and the person you're replying to are.
- mm007emko 4y agoThanks. English is not my native language.
- Hedepig 4y agoWhen you say "fad", do you also mean over-hyped?
- mm007emko 4y agoIn this case, yes.
- Zababa 4y ago> Ocaml's standard library is a huge sore point. I think this is a bit overstated. It's roughly the same size of JavaScript, missing regexes but having some stuff that JS lacks. And in lots of languages with large standard libraries, people tend to use standard library replacements. Considering that htere are also not a lot of people working on OCaml, the core team time is better spent on stuff like multicore rather than HTTP servers and clients. The standard library is also open to contributions. For example, in OCaml 4.14, 44 functions were added in the module Seq https://v2.ocaml.org/api/Seq.html https://v2.ocaml.org/api/Seq.html. String also had a lot of utility functions for integer decoding in 4.13 https://v2.ocaml.org/api/String.html https://v2.ocaml.org/api/String.html.
- cassepipe 4y agoNit : From what I remember and most unintuitively Reason is the language/alternative Ocaml syntax and ReasonML is its umbrella project.
- Kototama 4y agoIt's not about functional programming, it's about managing state. And FP is good at managing state, so no it's not going away, specially with multiple cores and distributed systems. Even databases are learning from the patterns seen in FP.
- sunflowerdeath 4y agoBut wait, OCaml is not just a functional language, even the "O" in its name stands for "Objective".
- ngrilly 4y agoThat doesn’t explain why languages like Go, Kotlin or Rust became mainstream, and why languages like OCaml or F# didn’t. This is the real question. Is it because most programmers prefer languages that are mainly imperative instead of functional? Is it because of where those languages originated? Is it because of the runtime, the tools, the documentation and/or the standard library, and not the language itself?
- no_wizard 4y agoI think its because influential companies in the tech space pushed them. For instance, Go is backed by Google, and they made alot of rounds evangelizing Go. Kotlin is a Jetbrains project and it certainly didn't hurt that Google made Kotlin the preferred language over Java for development on Android, and that Kotlin itself has great Java ecosystem compatibility. For years, Rust was Mozilla's baby, and they did a lot of good work evangelizing Rust for its use case, and other companies adopted it as well, continuing the cycle. There is nothing I can think of that is comparable for F#, OCaml, Haskell and many other fine languages
- ngrilly 4y agoThe corporate backing is a good working hypothesis for C, C++, Java, C#, Go, Kotlin, Swift, Dart, JavaScript, TypeScript and Rust. But it doesn't explain how PHP, Python and Ruby became mainstream. Maybe those ones are just outliers, products of a very special period of time when "dynamic" programming languages were popular (and it's easier for a small team to develop such a language) and when the web was growing very fast (and many devs were bored with the "ceremony" of "static" programming languages like Java).
- runevault 4y agoPHP I feel like was mostly all the old web providers you could sign up for to run your own site always had LAMP stacks available as options either default installed or trivially installable, often with instructions. Ruby I'm not sure what caused the hype unless it was something like Heroku making deployable Rails easy.