F# suffers from being a stepchild in what concerns .NET product management.
They accepted to place it on the box, but never gave it the same love as VB and C#, or even C++/CLI, and now they could rename the Common Language Runtime into C# Language Runtime, given how little outside they give to anything not C# on newer workloads.
Had F# been given feature parity with C# and VB on Visual Studio tooling and core frameworks, the adoption scenario would be much different.
F# is great and it benefits from the .net ecosystem but at the same time the language sometimes feels like it is being held back now by not wanting to add new features that c# doesn't support, so its relation to .net is kind of both a blessing and a curse.
Previously it added a lot of stuff on its own like async, etc. which was cool but also resulted in compatibility issues when c# later added similar features.
Now the f# developers are very concerned with compatibility but it basically means that f# can't get new features until c# already has them. It's also limited by the runtime which is designed around c#.
For example, it doesn't support type classes because (among other reasons) that might end up being incompatible with future c# type-class like features several years down the line.
It's also hard to learn f# unless you already know some ocaml/haskell.
ocaml has failed to catch on that much so far but I think it does have potential, and adding multicore support/effects is pretty promising.
On the other hand the fragmentation with stuff like reason/rescript is pretty dumb.
From a pure pro-ocaml perspective I don't really appreciate rescript per se. But it truly does seemed to have raised awareness of the language among web devs who otherwise don't have a reason to worry about much outside of js/ts. The timing is also good because typescript has directly shown devs the value of types, and taught them enough about them to understand what ocaml is really offering above ts-style static type checking.
That's my impression from my last two typescript jobs, anyway. I don't know what, if anything, will come out of this, but I can't see it being bad.
I don't think it's that different at the moment but they apparently wanted to not be constrained by reason/ocaml compatibility going forward.
Reason seems to be pretty dead so now the relationship between ocaml and rescript is kind of like that between haskell and purescript.
This may be good if you only want to run it on the frontend but it's not as good if you're using ocaml on the backend and want to share code, but I guess there's js_of_ocaml
I also don't think the existence of rescript is in itself a bad thing, it's just that the whole confusion around reason/rescript may have harmed development of ocaml for a while.
> whole confusion around reason/rescript may have harmed development of ocaml for a while
OCaml is an anchor language for many important projects (e.g. Coq) and companies (INRIA, Janestreet etc). The momentum behind OCaml has grown and I don't think the rescript/reason separation affected it _that_ much.
But I am curious to know if rescript/reason issue harmed rescript. While rescript gained a lot of technical freedom from the breakaway from OCaml it lost some people along the way. Was the breakaway worth it in retrospect?
I was very interested in Reason when it appeared, and it seemed to have immense momentum: exploring arguably better (or more familiar) syntax, tool integrations etc. I know that people ran regular OCaml workflows/projects with it.
And then the whole split happened ... why? "We don't want to be constrained by OCaml" while keeping all of OCaml's syntactic idiosyncrasies among other things doesn't sound like a proper, well, reason.
This is where I stopped being interested (and as I imagine, many people stopped, too). Because a slit in a niche miniature language (which it was at the time) means only one thing: not enough resources to continue with either one.
Oh I have no idea I didn't hear about any of these until after the schism or whatever, and haven't bothered to understand the differences and relationships. I use ocaml and hear js/ts people talk about rescript sometimes so I looked into it instead of the others.
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
Functional 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.
I 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.
Just 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.
By definition, fad is an intense and widely shared enthusiasm for something, especially one that is short-lived; a craze.
I don't see OOP enthusiasm to be short lived.
Many are still living in the Kingdom of Nouns, are follow Uncle Bob's preaching with due diligence and judge you harshly if you don't make everything a class and don't use lots of design patterns even if they are not needed.
> [...] 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").
Without verdict about what else you wrote: What a fitting description, "kingdom of nouns". I'll steal that for my next anti-mainstream-OOP-everything-must-be-a-class-rant, if you do not mind.
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.
It'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.
That 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?
I 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
The 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).
They were first round languages. When Python came out, it was largely a C / C++ driven world (Python predates Java by 3 years). It's original use case was around scripting C / C++ programs. If I recall correctly one of the biggest use cases for Python early on was doing test harnesses for C++ codebases in particular. Python's ability to basically be "wrapper for C / C++ libraries" is still its main strength, though clearly the language evolved since this time period. Pascal was a big player too back then, and has fallen quite substantially from developer mind-share. (in the 1980s, predating this era, there was a lot of work and energy around Objective Pascal and getting that on every platform they could. It almost worked. This is what Embarcadero[0] is all about via Delphi[1])
PHP was "easier" Perl. Perl was also ubiquitous at one time because of CGI and the web. PHP was one of the first languages to have the same ease of deployment story as Perl but a much easier syntax to deal with. Again, language space wasn't as crowded then. Certainly both were easier to use than C / C++.
It was easier to gain a foothold in the first round (web 1.0 era if you will) of software and development. There was simply less competition. Java didn't even come out till 1996.
The second era of languages, I think really starting with Go and continuing through to Rust, they faced a bigger uphill battle. There simply isn't the mindshare to capture as easily as there was back then.
Admittedly, I'm still not sure to this day why Ruby took off, other than it offered a great developer first experience as a language, from what I understand. It seems people who use Ruby tend to really like it. It seems it has a stickiness there that other languages don't, maybe? I've always been confused by this one, and I admit that's due to personal bias of not enjoying its syntax at all, however there are clearly lots of people who do. I just prefer one true way of doing things.
i think ruby took off because it was a better perl at a time people were really wanting one. python didn't really fill that gap because it did not embrace perl's shell scripting and quick text processing aspects, whereas ruby did, as well as providing a much cleaner and more consistent language. also the developer experience really is wonderful.
PHP 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.
Didn't python become mainstream until numpy/pandas? In my mind, data science was Python's killer app, but maybe that's just my revisionist brain. Similarly, I think Ruby had Rails as its vehicle.
Rust also brought something completely novel to the mainstream, so I wouldn’t put them next to Go and Kotlin, which are at most different combinations of existing features.
I'm pretty confident we will find a fairly direct correlation between how mainstream the language has become and how much money was poured into its development (i.e. headcount of engineers working on the project and their salary levels).
Now I know correlation does not equal causation. But you have to think it must have some effect when Google is paying its Distinguished Engineers--the likes of Rob Pike, Ken Thompson--plus at least several more engineers, project managers, and others. All to work on Go. Can you imagine what the OCaml ecosystem could do with that kind of money and dedicated engineering talent? Heck, any technology for that matter.
F# is a fantastic language! However, its official documentation is a bit lacking (like the C# ones). Also having developed some reactive applications I'd say .NET core needs some improvements before people can have fun developing desktop or web apps with it
F# can't become big for the same reason C# isn't bigger and Swift probably won't be bigger either. It's locked into an OS-specific platform and very specific non-free dev tools. (Even if .net is open now, it still took too long to be available on Linux, and now it's reputation is as a Windows only platform).
> everyone starts learning programming with a C-based language
Idk about that, especially in the past decade. Python seems to be the most popular language that people pick up on their own as their first one.
As for the intro college courses for programming, they mostly seem to be Python or Java, with occasional C (havent seen that one myself yet for an intro class), and one incidence of OCaml (apparently Cornell teach their intro to CS in it).
They accepted to place it on the box, but never gave it the same love as VB and C#, or even C++/CLI, and now they could rename the Common Language Runtime into C# Language Runtime, given how little outside they give to anything not C# on newer workloads.
Had F# been given feature parity with C# and VB on Visual Studio tooling and core frameworks, the adoption scenario would be much different.