"So, which programming language(s) should I learn?" That is a question I often meet from students on my courses. And what do I answer to that? I am very tempted to use the non-committal "it depends", which is a favourite when we discuss matters within Human-Computer Interaction. However, I am not that cruel. In fact, I'm worse.
"It really doesn't matter", is therefore instead what I reply. Now that's a mean answer, I assume. But it does reflect the idea of programming that I touched upon in a previous post. But I think that there is some explanation left wanting here. So bear with me in this second post on the topic.
You should learn one procedural language, one functional language and one object-oriented language /.../. Then you will be doing fine!
The Turing machine has been proven to be able to perform any programmable task. This means that any program written in any programming language will necessarily be equal to, or weaker than a Turing machine (apart from in terms of efficiency and time consumption, of course).
So, from a computational point of view, it seems that no language should have any advantage over another. While this is not perfectly true, it's an indication of what I am after here. Let us now look a little at the differences between some languages. What is e.g. the difference between Java, Python and C++? Or C and Pascal? Essentially the differences, if any, lie in the paradigms, whether we have a procedural, an object-oriented, a declarative, or a functional type.
Programming is still a skill, and in some cases almost even a form of art. What do I mean by that? If we look at different programmers' solutions to more complex problems, we will most likely not find (m)any duplicates of the produced code. Every skilled programmer has her or his own style. However, there are many "wheels" that have been invented over time, and those wheels are not in the semi-colons or the wavy brackets. These wheels are the principles behind the code. Some of them are in the paradigm, e.g., object-orientation and declarative interpretations. There is most of the time no need to reinvent these wheels, especially not when you are under pressure for time. They will be developed intentionally within the disciplines of computer science.
What we should learn when we study programming, is how to actually solve a problem using the principles that are available. The precise language we implement our applications in should be of minor interest, although I may add that if asked the same question again, I might reconsider the answer slightly into:
"You should learn one procedural language, one functional language and one object-oriented language, and if you have the energy left after that you should enjoy learning a declarative language. Then you will be doing fine!".
So, why would that be a better reply? Well, if they do this they have to learn three (four) different paradigms, and hopefully also realise that the code and syntax of the language itself is essentially non-important knowledge, most of which you can find examples of on the internet. Understanding how to apply the principles of programming, on the other hand, is not something you can just "Google".
This post will also be crossposted on my other blogs:
https://moomindad.wordpress.com/ and https://www.uptrennd.com/user/NTY2NjI