The Next Big Language

Note from 2014: The title is too sensational, the article’s scope too big, the analyses too shallow. It was my first blog article so I think it can be excused :).


It is already 2010 and one wonders: What’s going to be the next big language for this decade? A lot of people already tried predicting it and I admit it gets a little bit old. Anyways, this post is my take on it.

I won’t consider languages that are mostly used in a particular niche like Erlang or PHP - even though they are ubiquitous in their respective niche. Instead I’m going to focus on general purpose languages. As we all know C, C++, C# and Java are these big mainstream languages of today with “recent” additions Python, Ruby, Javascript and, especially in the Apple world, Objective-C. These languages are here to stay for quite some time. I’d say at least the next 15 years. C might be around even much longer than that.

It is great that productive and fun languages like Python became mainstream. But these dynamic languages have their downsides, too. Maybe it won’t be speed anymore in the future (or in other words: the speed difference will become neglectable for most tasks) with projects like LuaJIT, v8, PyPy or Unladen Swallow. Still, the compile time correctness of static languages is something that is very convenient for certain tasks. As such, most of my predictions are statically typed languages.

I want to add that I don’t believe the next big language is a language that edges all the others away! There still will be other mainstream languages even if only for legacy reasons and there still will be highly specific niche languages. However, wouldn’t it be great if there was a language which incorporated the flexibility of dynamic languages with the speed and the correctnes of statically typed languages and had support for a lot of paradigms without being a huge mess?

What do I expect from a programming language?

Before naming the predictions I want you to understand my metrics. They are ordered by descending priority. A good language should

  • be readable
  • be unambiguous
  • be concise
  • be expressive without heavyweight syntax
  • have one (canonical) way of doing things
  • be fast

All in all a language should feel like it helps you formalizing your thoughts instead of being a hindrance. Busywork code is not important. En passent, the Zen of Python is a great guiding principle for what a good language should be like.

And now to the contenders:

Clojure

Clojure is a dynamic programming language that targets the Java Virtual Machine (and the CLR). It is designed to be a general-purpose language, combining the approachability and interactive development of a scripting language with an efficient and robust infrastructure for multithreaded programming. […] Clojure is a dialect of Lisp, and shares with Lisp the code-as-data philosophy and a powerful macro system. Clojure is predominantly a functional programming language, and features a rich set of immutable, persistent data structures. Source

This pretty much sums up Clojure but I still want to add some of my impressions. In my opinion the most practically useful feature of clojure for day to day programming1 are the native collection data structures, i.e. lists, vectors, maps, sets, that are all consistently abstracted after the idea of a head and a tail. I learnt to love to have such data structures available in a language while using Python. It makes you far more productive. This blog post comes to the same conclusion.

Another important characteristic of Clojure is its orientation towards concurrency. It is important because our computers get more and more cores and using them efficiently is a problem. As Clojure is functional2, which makes reasoning about concurrency easier since you don’t have shared state and side effects, and has built in concurrency features like STM, Agents and Atoms it is a good fit for the “concurrent future”.

Moreover Clojure is a Lisp and therefore supports Macros, a super easy syntax and Metaprogramming. Although this is all nice and good (and powerful) and I came to appreciate Lisps when I learnt Scheme in University not everyone likes Lisps - even if only because of the “parantheses”. This will be a stumbling block for major adoption.

Another double-sided sword is Clojure’s attachment to the JVM. On the one hand this bootstrapped Clojure’s adoption3 and gave Clojure a variety of libraries to work with. On the other hand these Java libraries are not written with Clojure’s idioms and thus probably feel not very fitting even though Clojure’s Java interoperability is great. And who knows where Java the platform is heading in the future after Oracle’s acquisition of Java? But Clojure in Clojure may loose the bound between Java and Clojure and make Clojure more independant.

Concluding, I think Clojure will get even more mindshare and momentum than it has already now. It seems to be a well thought out language that builds on proven grounds (Lisp, functional) yet still innovates (structural sharing, STM). There are still some show stoppers, e.g. editor/IDE support, but they will vanish eventually. Do I think that Clojure will become “the next big language”? Frankly, I don’t know because even though Clojure is a general purpose language it is not the best fit for some problems simply because it is dynamical and embraces immutability.

Summing up

Advantages

  • great built in concurrency support
  • strong native datatypes
  • functional
  • it’s a lisp
  • on the jvm + natural interoperability with java

Disadvantages

  • on the jvm
  • it’s a lisp
  • not that fast
  • not very beginner friendly

Articles/Links

Screencasts

Go

Go is expressive, concise, clean, and efficient. Its concurrency mechanisms make it easy to write programs that get the most out of multicore and networked machines, while its novel type system enables flexible and modular program construction. Go compiles quickly to machine code yet has the convenience of garbage collection and the power of run-time reflection. It’s a fast, statically typed, compiled language that feels like a dynamically typed, interpreted language. Source

You probably heard about Go the Google sponsored, Rob Pike powered successor to C. I certainly like Go’s philosophy especially the fact that Go wants to combine the ease of use and fun of dynamically typed, interpreted languages with the correctnes and speed of statically typed, compiled languages. Also, Go aims for minimalism. In contrast to other languages Go has very few keywords4.

I also like the fact that concurrency is built into the language in the form of CSP. In that regard Go is armed for the future just like Clojure. Go’s novel, “tolerant” type system with it’s ad-hoc interfaces seems to by very convenient, too.

However I really must say that Go’s syntax is somehow ugly. I don’t know why but it seems hard to read. Maybe it is because I haven’t programmed in Go and if I started I would accustom to it. But the first impression is not good.

Then there are some questionable design decisions like no generics, defining the visibility of a variable/function by writing the first character in lowercase or uppercase, no enums5 and no exceptions6.

To conclude I think that Go has the potential to become the next big language but not in its current form. I like some things and I don’t like others. I’m not yet sold on Go. But if it improves some of its design decisions (like adding generics) I believe Go’s chances to truly become the next big language would more than double.

Summing up

Advantages

  • relatively small
  • fast compilation
  • ad-hoc interfaces
  • concurrency support baked into the language
  • unconventional

Disadvantages

  • unconventional
  • ugly syntax
  • questionable design decisions

Articles/Links

Screencasts

D

D is a systems programming language. Its focus is on combining the power and high performance of C and C++ with the programmer productivity of modern languages like Ruby and Python. Special attention is given to the needs of quality assurance, documentation, management, portability and reliability. The D language is statically typed and compiles directly to machine code. It’s multiparadigm, supporting many programming styles: imperative, object oriented, and metaprogramming. It’s a member of the C syntax family, and its appearance is very similar to that of C++. Source

You may remember this sentence from the introduction of this post.

However, wouldn’t it be great if there was a language which incorporated the flexibility of dynamic languages with the speed and the correctnes of statically typed languages and had support for a lot of paradigms without being a huge mess?

Well, in my humble opinion D seems to take a huge step in that direction. Although Go is going in that direction, too, in the sense of combining the flexibility and fun of dynamically typed languges with the safety and speed of a statically typed system, it seems to me that Go is a bit too simple for its own sake. If you want to read a very interesting thread comparing D to Go on the Go Mailing list here you go. But if you want to take the short route this sentence pretty much sums up the different philosophies behind D and Go:

Go seems to aim for simple as possible while being fast, flexible, and featureful enough. D seems to aim for fast, flexible, and featureful as possible while being simple enough. Source

I really like the fact that D is featureful although many other point out that it is a disadvantage. It is indeed a disadvantage if a feature introduces more complexity than it provides productivity (I’m looking at you C++!). Turning the last sentence inside out gives: It is indeed an advantage if a feature provides more productivity than it introduces complexity (I’m looking at you D!). Let’s consider Python. Python certainly is not a small language. Nevertheless it is one of the most productive languages around. See, that’s what I’m talking about. With D you are not bound to one paradigm but can choose which paradigm to use for which problem. D has built in unit testing support which certainly improves its adaption. To cut a long story short, go to the D Website to learn more about D’s features.

What shines from the outside is ugly inside. D has a bad reputation. I gathered some reasons from various complaints on the internet:

  • compiler bugs
  • no up-to-date open source compiler
  • standard library split (Tango, Phobos)
  • community feels not integrated in the process of developing D
  • backwards incompatible changeover to D2

So the consensus is that D the language is not bad at all but the language ecosystem is broken. But what is a language worth without a vivid ecosystem? It’s probably nice to look at but you can’t get anything done with it.

Summing up I think D as a language has the most potential to become the next big language. Unfortunately it’s ecosystem seems to be broken and unless it is fixed D has a hard time fighting for the throne.

Summing up

Advantages

  • real successor to C++
  • featureful
  • fast compilation
  • multi paradigm

Disadvantages

  • featureful
  • gets a lot of hate
  • broken ecosystem (?)
  • not innovative/unconventional enough

Articles/Links

Screencasts

Underdogs

Now, these are languages that don’t get a lot of publicity and thus won’t take over anytime soon in contrast to Go, D and Clojure. Nevertheless it is interesting to see some more or less unconvential LWA7.

Rust

I can’t say much8 about Rust other than it is a statically typed programming language from Mozilla with a focus on systems programming and some interesting new ideas9. To learn more about Rust have a look at this discussion or this blog post.

Clay

I was tired when I clicked the link to Clay’s Homepage but the code snippets kind of made me awake again because they looked so good and readable. Clay is a generic programming language which aims to be a successor to C. Thus, Clay is as fast as C and has the same runtime overhead as C. On the other hand Clay has no garbage collector, which is mentionend as an advantage on the homepage. Yes, it is probably (or not?) an advantage for systems programming but not for general purpose programming. However, I don’t think it would be impossible to make Clay have a garbage collector if it ever gained much traction. Here are some links/articles about Clay that get you informed.

OOC

I stumbled over a link to OOC on reddit I think. I didn’t read information about OOC thouroughly but from the outside it looks quite nice. And if nothing else OOC has a good looking website ;).

BitC

As far as I understood BitC is a research language that combines low-level C with high level functional languages like Haskell or OCAML. Its aim is noble but it seems BitC has a long way to go.

Factor

Whenever I read10 something about Factor it is praised and it is particularly pointed out that Factor has an excellent interactive environment. As an outsider Factor looks weird to me but the enthusiats undoubtedly have a reason to like Factor so there must be something to it. Maybe someday I’ll found out.

Lua

Lua is a lightweight multi-paradigm programming language designed as a scripting language with extensible semantics as a primary goal. […] Lua has a relatively simple C API compared to other scripting languages. Source

Lua’s focus is to be an embeddable language. Nonetheless it is very powerful on its own since it is built on selected, flexible features. The Wikipedia article about Lua says that its design has been influenced by Scheme and I think it shows. To learn more about Lua’s design you can have a look at this discussion.

Often it is considered a problem by skeptics that Lua does not offer a lot of libraries like Python does that are very handy for general purpose programming. While it is true that Lua’s standard library is small, since Lua’s focus is to be embeddable, there is a large repository of libraries at LuaForge or Penlight. Still, despite being around for a long time Lua has not taken off as a general purpose programming language11. There are some opinions and discussions (or here) as to why this is the case. On the other hand Python, Javascript and Ruby were around a long time, too, until they finally gained traction… Plus, there is Luajit. It makes Lua almost as fast as C with considerably less code! If you don’t believe me look at this benchmark that relates code size and execution speed of a language (implementation). Of course Luajit is architecture specific but it’s still impressive.

In the not so distant future I’m going to get my hands dirty with Lua. Then I can blog about my experiences with Lua and check if my impressions on Lua will prove to be true.

Who will win?

As you can see all three main contender languages are made by practitioners who saw mistakes in the existent languages and who learned from these mistakes. These languages are thus made to get work done. Also, they aren’t designed with radical and untested ideas. Each language has longer roots than it seems. Clojure’s roots are mostly Lisp and Scheme, D’s roots are mostly C++ and dynamic languages in general and Go’s roots are mostly C and some other languages based on CSP. Obviously their philosophies are quite different because of this.

The underdog languages, especially Clay, seem to be very nice but unfortunately there is a reason why they are underdogs and major adoption in the following years is unlikely.

As far as I am concerned my fingers are crossed for D although I’d be happy if any of these languages gained traction. It’s just that I found D’s code snippets readable, I like D’s philosophy and most importantly: there is a need for a successor to C++.

In the end it is of course not solely the language per se which will change the tack. Perhaps even more important than the language design is the language ecosystem, e.g. the libraries, (company) support, mind share, heroes etc. In this regard Go is ahead by a nose (Rob Pike, Google) but D has its stars (Andrei Alexandrescu, Walter Bright), too.

And even if none of the contenders will “win” - the programmer will win in any case because the innovation, discussion and competition that these languages provoke improve our understanding of programming and may even influence existing languages to incorporate new features.

Update: Languages from the comments

I didn’t expect this amount of feedback so first of all: Thanks for the rich discussion!

As I already mentionend several times in the discussions it is impossible to do justice to every language. But to do at least a bit more justice to other languages I decided to simply list resp. link to languages that were mentionend in the comments as a worthy contender for the next big language but that were missing in my blog post.

But before doing that I want to adress all the comments that go like: “What about Javascript?”. I already count Javascript as a big language as you can read in the introduction of this blog post. With projects like nodejs, commonjs, jquery, the increased deployment of Javascript engines into other software than browsers like Unity, the amount of work pushed into increasing Javascript execution speed by browser manufacturers, the hypothesis that everybody “knows Javascript”12 and the mere fact that Javascript is the de facto scripting language of the web makes Javascript already now a big language. Besides that just have look at the (controversial) TIOBE Index. Javascript is at place 11 as of now.

As this is out of the way let’s go to the contenders from the comments (the source for the summaries is wikipedia):

F#
F# is a multi-paradigm programming language, targeting the .NET Framework, that encompasses functional programming as well as imperative and object-oriented programming disciplines.
Scala
Scala is a multi-paradigm programming language designed to integrate features of object-oriented programming and functional programming.
Haskell
Haskell is a standardized, general-purpose purely functional programming language, with non-strict semantics and strong static typing.
Fantom
Fantom is a general purpose object-oriented programming language that runs on the JRE, .NET CLR, and Javascript.
Cobra
Cobra is an object-oriented programming language produced by Cobra Language LLC. Cobra is designed by Chuck Esterbrook, and runs on the Microsoft .NET and Mono platforms. It is strongly influenced by Python, C#, Eiffel, Objective-C, and other programming languages. It supports both static and dynamic typing. It has first class support for unit tests and contracts. It has lambda expressions, closures, list comprehensions and generators.

  1. functional features, immutability and native concurrency support are all nice, but they are not needed for every problem whereas data structures are always needed. 

  2. although not purely functional 

  3. especially in corporate environments 

  4. If I remember correctly that’s also the case for Clojure and Lua and probably a bunch of other (lesser known) languages. But Clojure and Lua are dynamically typed whereas Go is statically typed so it is not really a fair comparison. 

  5. though you can almost recreate them with the help of iota 

  6. though you can use defer/panic 

  7. Languages with attitude ;) 

  8. there is no official implementation of the language yet 

  9. for instance typestate [PDF

  10. which is not often 

  11. though Lua is widespread as a scripting language especially for games 

  12. It is of course an exaggeration but there’s still the rumor that a lot of people are at least familiar with basic Javascript and that therefore it is easier to find employees. 

Published: 17.10.2010 Last modified: 24.08.2014
Comment? Mail or tweet me.