This debate has raged on for a long time. In your opinion, what is the best programming language to learn as your first programming language?
When I’m asked this question, my approach is to consider which language will be the most valuable throughout a career. Making matters more complicated, you won’t just be learning the language, you’ll be learning all of the fundamentals and concepts of programming simultaneously.
Yes, I know, I’m missing XYZ languages that are your favorites. There are many pros and cons to each language overall and each language as a foundation.
My largest deciding factors are:
A) which language will provide the best conceptual foundation
B) which language will be the most helpful transitioning to other languages
C) which language will make you the most marketable
For that conceptual foundation, I’m talking about object oriented programming. When learning some of the more difficult to grasp concepts, seeing the implementation of that concept and following it can be like flipping a light switch in your brain. If however, you can’t make sense of the syntax, that’s not going to happen. For learning the fundamentals of programming, I think that Python and Ruby do a fantastic job. Being a bit more traditional, I like C# and Java myself.
The languages that I consider to be the most helpful when it comes to transitioning to new languages are: Java, C#, and C++. If you become skilled at any of those 3, you can rapidly learn the other 2. What’s more, the other languages in my list are all highly influenced by these 3 languages. On the flip side, if you start out with Objective-C and it’s whacky syntax and ambiguous style, you’re going to have a hell of a time switching to another language. Likewise but to a lesser extent, Ruby and Python’s syntax is a fair bit different than the rest.
Finally, as for which language makes you the most marketable, this depends almost entirely on what you plan on doing with yourself. This is the largest variable in the recommendation I give. If you tell me your ideal programming gig, knowing that information makes all the difference. You want to work at Google? Best go Python. You want to work in the enterprise space, learn Java or C#. You want to build websites? Probably go PHP or Ruby. Pledged your soul to Apple? Just dive into Objective-C and never program outside of their massive ecosystem.
As a broad recommendation however, I almost always suggest Java or C#. Learning one of those languages well will give you the ability to learn all languages with far less resistance. I personally started out with C# and have been programming in it (and Java) for over a decade. In that time I've learned close to a dozen programming languages that I use on a regular basis. That experience is definitely contributing to my overall recommendation as well.
How do you approach this question? What recommendation would you give to a university rebuilding their CS program? To a freelancer? To a job hunter? It’s not an easy question.