Learning Programming Languages that Expand the Mind

When I experience a burnout, or when I am about to lose interest in programming, I take a step back and ask myself why I'm feeling that way. Usually it's because of the repetitive code that I have to write, or the monstrous code base that I have to maintain. Those chores are not what makes programming great. So when I reach the point where I can't stand it anymore, I start to look for ways to recreate that joy I first experienced when I first started programming. That joy comes from seeing problems in new ways, internalizing new programming paradigms, and solving problems in new ways. In other words, all the things one would get by studying a language that is different enough from the ones already present in one's toolkit. These are the mind-expanding languages that allows experienced programmers to feel like a beginner all over again, liberating the mind from the drudgery repetition and the closed world of his/her existing tools.

I only learn these languages to satisfy my inner curiosity, and to experience pure joy once again, without much regard to practicalities (i.e. how well the language implementations do in production). It is of course a huge bonus if the language implementation makes it feasible for production use, but that isn't a big consideration. The availability of computer science texts in the language makes it more attractive.

Here are a few I have looked at:

  1. Standard ML Programming language that allows one to explore functional programming with types. Because of type inference, the code does not get too verbose. This was the first (and only) languages whose syntax I fell in love with. I saw the recursive definition of exponentiation and instantly decided to learn it. So beautiful and flexible! There are also a number of computer science texts that use Standard ML to explain concepts. A good one is ML for the Working Programmer by Larry C. Paulson. If not mistaken, the University of Cambridge uses Standard ML to introduce computer science to its first year students, and this is the suggested book. The library situation for Standard ML is not that great. It looks like a dead language that is only used for teaching and academia. I don't see this as a huge minus, because it allows me to focus on learning, instead of chasing after the next big thing (think JS...). There is OCaml, a somewhat related language that has more libraries and has industrial support, but it is not as simple as Standard ML, and I don't like its syntax as much.

  2. Scheme Very flexible language that I use for experimenting with ideas whenever they pop up. The syntax is extremely simple and consistent. Using Racket, a ton of libraries (both built-in and third-party) are at your disposal, which can be used in production. There are also lots of good books that make use of Scheme. The famous Structure and Interpretation of Computer Programs comes to mind. There is also The Little Schemer series of books, which give a charming overview of the capabilities of Scheme, without it feeling too serious.

  3. Haskell Due to the difference in which the code is evaluated, Haskell heavily encourages the programmer to write code in functional style. This is a good thing when learning functional programming. My own journey here has not yet reached its first milestone. A book widely recommended is Programming in Haskell. Haskell seems to have some industrial users, but I think the main point of learning Haskell is to experience the pervasive lazy evaluation.

  4. Prolog This one forces you to look at computation differently. Prolog is very different from the mainstream languages in that it is a logic programming language. Although capable of the usual imperative algorithms, the power of Prolog comes from the built-in backtracking search and unification. This one will make you feel like a beginner all over again. I have not had much experience with Prolog, but the last time I looked at it, I used Prolog Programming for Artificial Intelligence by Ivan Bratko. A classic Prolog book is The Art of Prolog.


No doubt that I have missed some of other mind-expanding programming languages that are capable of dramatically changing the way I think, but these are the ones I've found so far and had the chance to try them out. Other languages like Erlang and Elixir come to mind as some of the languages I should take a look at. Oh well. Let's continue the adventure in programming languages!