The family tree of programming languages

Forming a family tree of how programming languages are related is not easy as we can argue for a while over how much they have influenced each other. It would also be impossible for us to draw a tree that includes all of the existing languages as there are so many that fitting them into even a page of this book would be impossible. What we can do, however, is draw a tree that includes languages that are either popular right now or that have influenced these languages in a significant way.

The selection of languages we will use here is based on their popularity—that is, they are the languages that you are most likely to use. To know what languages are the most popular ones today, we can turn to several sources. The question is how to measure how popular a language is, and different sources use different criteria to make this selection. If we browse through several top lists online, we will soon discover that there are some languages that make it into all of these lists. So, let's start with them and see how we can build a tree from there.

The languages I will include, in no particular order, are JavaScript, Java, Python, PHP, C, C++, C#, and Ruby.

If we start with one language—for example, C—and look at what languages it is influenced by, we will find assembly language, Fortran, and ALGOL (if we just focus on the ones we mentioned earlier). We can now start to draw this tree. If we then do the same for the other languages and see which ones have influenced them and which ones they have influenced, we will end up with a tree that looks something like this:

Figure 2.1: Family tree of some programming languages

We could have lengthy discussions on whether this is an accurate representation, but it gives us a general idea of how languages inspire each other. Of the languages we have talked about, only COBOL can't directly be linked to any of these languages. This does not mean that COBOL is not essential, but to the languages that made it into this tree, COBOL has not had any significant influence.

Another thing to note about this diagram is that languages that have ALGOL as their common ancestor are overrepresented. The reason for this is that among the most popular languages today, they all come from a group often referred to as the ALGOL family of languages. I have also taken the liberty to leave out some intermediate languages from some of these relationships to reduce the size of the tree. What we don't see in this family tree is a language that springs up that is totally unrelated to any existing language. What that means is that new languages are created as a reaction to an existing language. When creating a new language, we take the parts we like from one or more languages and change the parts we don't like.

The reason this tree can be interesting is that if I learn one programming language, then learning a related language is much easier then learning one that is further away in the tree.