When will the next best language appear? (translation)

Posted on 20.09.2024

This is a translation of a great comment by Sergeï Samoïlenko I bookmarked some time ago. It was for a discussion about what feature would the ideal programming language have.

Next best?

You should remember first that ordering is not defined for every set: you can’t say that one point in space is larger than another one, neither can you compare complex numbers. When people forget about this fact, this leads to so many holy wars of nothing: everyone is right yet noone is right.

Let’s think about evolution. You can compare the number of animals in each species or group: in this sense Earth is not a planet of humans, it’s a planet of bugs. We built these cities and invited roaches and pigeons to live in them. Continuing the analogy to compsci, the best language is not C or OCaml or Ruby, it’s HTML and CSS, and the winners are beginners and plain bad programmers; they are millions already and new ones come and come, they grab the simplest language they see and write and write… :) The next best language then would come with new technologies and new needs, or for example new fashion trends.

We can compare which animal will win in a fight. On our earth a human with a shotgun could solo anyone. But with languages choosing the “strong” is more difficult. If I had to code fight, I personally would pick Haskell or Mathematica. :) The first one allows you to quickly write a powerful and correct program, the second - to take advantage of a giant knowledge base and the flexibility it inherited from Lisp. Python and R are good in this role too, but I don’t really use them in my daily work. The next strong language would then come, for example, with the parallel computations being formalized to the point where the compiler can completely take care of them. We had a chance to observe this process once with the advent of garbage collection - what a great moment in time that was!

We can compare the survivability. Thermophile bacteria have firmly taken the extreme temperature niche and don’t have to compete with anyone. No highly developed animal could eat them - they’ll just boil alive. And then the bacteria will eat them back. Ice worms can live in snow, and then you have a human with an ATV who can go anywhere. Back to programming, such extreme niches appear all the time. There always will be FORTH and Lisp variants, just because they are so easy to whip up from nothing. And a man with a tiny C compiler will also always be able to go anywhere.

And then we have the longevity. This is also an evolutionary success! Sharks and crocodiles and ginkgo may not be numerous, but they have survived not one extinction event and have been with this planet for millions of years. Lambda calculus, Knuth’s ideas, and Lisp have been with us for a very long time, and seemingly will stay forever. And not just stay the same, they are constantly changing! Macsyma, Wolfram Mathematica, Maple - they all are big achievements of Lisp and perfected algorithms. Haskell changes slowly, every new step is a result of years of thinking and discussion, but new changes touch so many new avenues. Maybe it will evolve into something unrecognizable, but the ideas it produced are not going anywhere. It’s thanks to the functional programming advances of Haskell and OCaml that we get formal proof assistants like Agda, Coq, and Idris. These are just a little piece of the future you can touch now.

The earth’s biosphere’s advantage is in its variety. If the strongest human kills everyone, it’s the human who will suffer. The plurality of languages is what makes our industry wonderful, and choosing just one winner won’t do you any good.

Tl notes

7 years since this was originally written, what pieces of future can we now say to hold in our hands? I’ve seen some great but niche advances in parallel computations. HVM (at least from afar) is a little wonder that does parallelization for you by itself and in multiple ways, and I should totally try it and Bend myself some time. We can now use our really stupid large language models together with Lean4 to simplify formalization even further - each human becomes their own lab supervisor with silly grad students. Robots working for humans - isn’t that the image of the future?

Other than these two examples, I can’t name anything that is not iterative improvement over what we had 15 years ago. Do you have any ideas?