- Supporting higher order functions in programming languages. Check.
- Usual operations on higher-order functions like currying? Check.
- Functional reactive programming. Check. Rx was a big thing a few years ago.
- Purely functional data structures. Check. Even Java has a few reasonably popular libraries that support such data structures.
- Using referential transparency whenever we can. Check.
- Using CPS (continuation-passing style) in daily programming. Check.
- Using recursion in production. This is not functional programming per se, but given that so many people mention recursion whenever they mention functional programming, it's worth listing recursion here. And mutual recursion and tail recursion, two of the hallmarks of entry-level functional programming techniques? Check and check. For instance, RxJava implements trampoline just to support tail-recursion, as it is necessary to implement cleanly some of RxJava's operators.
- Common techniques seen in functional programming, particularly the ones that involve map, reduce, scan, left-fold and right-fold. Check.
This is just the items that are on top of my mind. I'm sure I missed plenty. The gist is that people have been adopting functional programming. They just don't necessarily move to a purely functional programming language for practical reasons: platform, support, community, ecosystems, or even marketing. Programming paradigm is just one factor among many when people choose their programming languages.
A CPS transform for a computation of type `X` gives a computation of type `forall A. (X -> A) -> A`. That is, instead of evaluating to ("returning") a value of type `X`, you take a function that you deliver a valid of type `X` to, and return whatever it returns.
CPS-transforming a sum type `X + Y` gives `forall A. (X + Y -> A) -> A`, and if you distribute over the sum you get `forall A. ((X -> A) * (Y -> A)) -> A`. The visitor is the pair of functions you pass in, `(X -> A) * (Y -> A)`, and the value decides which method to call. In either event, it returns whatever the chosen visitor method returns.
(Dropping into Java syntax, this is the type of the `visit` method: `<A> A visit(Visitor<A> visitor)` -- and the Visitor is `interface Visitor<A> { A onX(X x); A onY(Y y); }`.)
The only ones I can think of are Java and C#, which are very big languages, but combined they're dwarfed by these languages, which follow the second rule:
C (Unix), C++ (compatible with C), JavaScript (browser), Objective C (OS X and iOS), Kotlin (Android), bash (first program to run on the Linux kernel)
Java is a primary interface to the Android platform (2008). When it was originally made decades ago (1996), it was supposed to be the first language for cross platform development (compile once run anywhere), it may not be one platform per se but it is equivalent in a way.
So basically the point is that the first reason is a special case of the second... Marketing alone does a little bit for a language, but having the platform is more important.
People choose platforms and not languages. Big companies are the ones that own platforms (Linux being an exception).
I don't recall Solaris ever being any significant, so must have been a good argument that Java could run on the many Unix/Linux variants besides Solaris.
I learned Unix and C on a SparcStation, and to this day I prefer workstations to other computers.
Even if Apple is the only one still making them...
But I'll try to answer anyway: Go. Dart. Maybe Rust (depending on whether nonprofits count). Delphi. All of these are in the TIOBE top 25 today.
Furthermore, languages like Kotlin, Swift, and C# became a primary interface to their respective platforms, but didn't necessarily start out that way. They got popular, and then became first-class platform citizens. It may have been the plan for them to eventually become that from the start, but I would claim they would have become popular even without the platform. So I put them in the first group.
You can write Windows programs in C# today, and many developers do, but I bet even more are using it for web development. And in a popularity contest (Zipf's Law), losing even half of your fans won't change your list position much.
Delphi was pushed by Borland, the InteliJ from the 90's, everyone doing indie development on MS-DOS and Windows early days was using Borland compilers, not Microsoft's.
Most Web development with C# is done on Windows anyway.
Nobody (hyperbole) gives a damn about math, even though they'll all end up using the very same ideas in mainstream clothing.
It might not be obvious to half the dev crowd but most thing they're talking about since 5 years is basically 80s academic FP. Destruct, patterns, lambdas, folds ..
- Cantor: smh
PHP do have its great niche.
Namely it's the only programming language where whole ecosystem lives and dies by the "build and burn the whole world on each request" mantra. It have significant advantages compared to other models of computation. (Granted even PHP devs often misplace "developer friendliness" of PHP, so you are not alone ;))
Ruby only has some popularity in the silicon valley. Never heard of companies really adopting Ruby outside of there. It's open to debate whether it can qualify as one of the popular languages.
Early on its key feature was easy hosting, there were a lot of shared host sites where using anything other than PHP or maybe a bit of Perl was difficult.
The "LAMP platform" is defined by the set of people using PHP/Perl, so I wouldn't call it "pushed" by that. It's not the native platform of Linux, Apache, MySQL, or the web, and there wasn't exactly any big company pushing it (Facebook famously uses it but it had already cemented its popularity by then).
In the past 25 years, I think we've seen quite clearly that programming language popularity depends on many different factors, and "quality of he underlying paradigm" is way down on that list -- if it's even a factor at all.
Just a quick glance at any list of most-used-languages will tell you that 50% of popularity is "is it being pushed by a big company?", and 25% is "is it the primary interface for a popular platform?"
Take away those two factors and there's maybe only about 3 languages left in the top 25 (Python, Ruby, PHP?).
Where quality shines is in being able to stay a viable niche for a long period of time. That's Scheme.