What makes a language popular?

In the recent HackerRank developer survey, we can see "Which languages do employers look for by industry?" and "Which languages are developers planning to learn next?" In terms of popularity, there is a definite swing to JavaScript and Python. In terms of mind share with language enthusiasts, not so much.

I don't really care about absolute popularity. What I need is tools so I can make good systems, combined with sufficient popularity for a healthy ecosystem. The biggest challenge for programming languages right now is how to handle concurrency and take advantage of multiple CPU cores without going insane. We are also seeing a swing from dynamic languages towards strongly typed functional languages like Haskell and OCaml.

Over the last 20 years we went from low level compiled languages like C++ to Java, then scripting languages like Perl, Ruby, and Python. Productivity of the dynamic languages was much higher, but they were slower and more susceptible to failures at runtime, so we needed lots of tests. The type inference in modern functional languages gives us a good combination of productivity, performance, and safety.

There is a balance between mass adoption and language power. In order to be successful, we need to have some combination of:

  • Accessibility for beginning and average programmers
  • A business model which drives investment in the platform
  • Language features which support "programming in the large" and productive frameworks
  • A good community of fellow programmers and jobs

JavaScript is the ultimate weak language, but it's extremely popular because it's accessible. It has a business model behind it which drives the platform. As the browser makers speed up the runtime, Node.js benefits on the server side. Google tried to get advanced features into the language, but couldn't reach consensus with the other browser platforms. JavaScript is slowly getting classes, optional typing and syntactic sugar. It won't get macros or advanced features which require strong typing, though, as it would break compatibility with the existing web and make it hard for beginners to learn. It's most interesting as a compilation target for advanced languages like Elm and Reason.

Python is one of my main languages, but it's having trouble evolving. I was disappointed when Python 3 was released, as it didn't have enough new features to justify switching large production code bases. Guido was hostile to functional style programming, e.g. map/reduce. Based on its growing success, he was probably correct, but I don't expect significant improvements in the language. It will be my scripting language of choice and useful for data science, but not for building big systems.

Java was really good at getting people to adopt it, and it wasn't by being powerful, it was by being more accessible and easier to use.

"We were not out to win over the Lisp programmers; we were after the C++ programmers. We managed to drag a lot of them about halfway to Lisp." - Guy Steele, Java spec co-author and Lisp pioneer

The Java VM has incredible amounts of engineering behind it. They started with object orientation, then added support for dynamic languages. By building on the Java VM, languages like Clojure and Scala get a good runtime and are not seen as being too risky. It is probably the future of Ruby. Java has potential as the "one VM to rule them all", unless Oracle screws it up. Microsoft .NET is the same, they have this nice VB.NET / C# / F# thing going to combine accessibility with power. It's a nice system, but too proprietary for my tastes. I have seen too much bad behavior from Microsoft in my life to invest in the platform.

Haskell is very powerful, but the academic terminology makes it difficult for beginning and workaday programmers. I am very interested in it myself, but I don't think it will be a mainstream language. It can be a nice "secret weapon", though, and it influences practical languages like Elm. OCaml gives us languages like Reason and F# on popular platforms. Its level of typing may be the right balance between strictness and getting things done. It's low level enough for systems programming, while keeping safety.

Erlang provides a very interesting language data point, as everything is there for practical reasons. It is functional because that's the way you make reliable and scalable systems. It does not do as much with types as I might like, compared to Haskell, but that makes it easy to understand.

Erlang has a solid VM with a business model supporting it. Ericsson uses it for their telecom products, and companies like WhatsApp add features that they need. It scales to use all our available CPU cores without drama. Mature tools let us manage and debug servers in production, and we can easily build highly available, highly scalable clusters. The platform has been been under development for 30 years. It's not going away, it's getting better.

Elixir brings the Erlang platform to a new generation of developers. It is easy to get started, and adds powerful features like Lisp-style macros and Clojure-style protocols. It takes the standard library functions from Erlang and makes them consistent and easy to use.

Elixir has a good chance at being a mainstream language for web and server side applications. It is a logical next step for the Rails community, as the platform hits its limits. It has a great community, and lots of libraries are getting written for web development and more advanced applications. It is the standard platform for building massive chat systems, and is popular for next generation IoT, financial, and health care systems. The Nerves platform makes it easy to build reliable embedded systems and appliances.

If Elixir stays at its current level of adoption, that that's fine. In the future I think we will see Erlang-style concurrency features in the JVM and .NET platforms. As we saw with Twisted Python, however, it is really hard to make existing code and libraries safe for concurrency. Every Java object is a potential problem. The most likely result of better concurrency primitives in the Java VM is probably Elixir being ported to it.