There are probably more than five, but let’s start there.
- C/C++ — Despite being a really old language, I consider C to be a must— it is the Latin of computer languages (although still very much used compared to Latin). I threw in C++ as I consider C++ mostly an extension of C, albeit a big extension (a C schism). Sure, C++ is all OO friendly, but so is Java and many other languages. Hence, you can learn OO elsewhere. In fact, learning OO and C++ at the same time could lead you to go insane — seriously. C++ is a monstrosity (multiple personality language — I mean multi-paradigm) and very complex. The Stroustrup book on C++ is probably 4 times thicker than the K&R book (even compared to the 2nd edition of K&R, which was thicker than the 1st edition). It probably would take someone ten years to truly master the language. And by the time you master it, they — I mean HE, and we all know to whom I am referring — will add 100 more things to it. Often when one needs to write code in C, C++ wouldn’t be a good substitute anyway. C++ has its strengths though, in particular, it is well suited for GUI and game development and, as such, Microsoft has strongly adopted it. C/C++ is one of the approved languages at Google as well.
- Java — Java, despite also being a rather old language, keeps getting reborn — it must have done something good in a former life. Thanks in part to Scala and Clojure (a dialect of Lisp) — both functional-friendly languages — and other functional languages on the JVM, Java gets the benefit. Java might be the new COBOL of business programming, as it is so dominant in the enterprise, but it is a great language despite being a bit noun-heavy and verbose. I suspect Scala won’t replace Java, rather Java will continue to develop more Scala-like features (i.e., functional stuff) — as is currently happening. Java is also one of the approved languages at Google. Java is loved in the enterprise. It is a rather fast language as the JVM has got a lot of researchers working on it. It’s used extensively on the server for larger enterprises as it is very fast and secure. It’s also hard to break code on it. The Java code you write will be very well managed by the JVM — like that nanny who took great care of you while your mother was off jet-setting the world with Rico Suave. Since the JVM has garbage collection, no need to stress about malloc/new and free/delete and pointer issues. Of course with Android adopting Java, you will be able to break into the mobile app world if you so desire. Maybe you will be put in charge of sending those annoying push notifications.
- C# — Backed by Microsoft, it is the most used language on the CLR (usurping ). I believe knowing this language will certainly make you more marketable. The good news if you know Java, you are pretty close to C# (excluding the .NET specifics, oh, and there are many). C#, in my opinion, is a little “nicer” of a language over Java, but they are very similar — I like to personify languages, sue me. Also the good news is if you know C#, you can more easily program on the CLR in any language because you will be comfortable with .NET — as comfortable as a stripper at a nude beach in France.
- Swift — It is the new language from Apple and can replace Objective-C. It is a pretty language — J. Lo pretty — and includes automatic reference counting (think of it like garbage collection lite). That’s when the garbageman picks up “most” of your garbage. It is Apple’s answer to C#. I really like the direction that Apple has gone with this. I think this is a much better approach than Microsoft’s with the CLR. If code portability isn’t your goal (as it often is in Java), why have a CLR? Apple realized that the code their developers write is designed to run on their machines, and their machines only, so why have a “CLR-type” middleman slowing things down? CLRs/JVMs are the used car salesmen of computer science, aren’t they? Ouch! I can only assume Microsoft thought having garbage collection was worth the expense of slowing down your code with a CLR. I think Apple’s approach with automatic reference counting is a better option — ultimately resulting in faster code and a better user experience. Starting PowerShell (a .NET/CLR app) on Windows, for example, is slow — as compared to the Command Prompt, which is pure native code as there is no CLR middleman. Have you tried the GitHub for Windows shell? It is as slow as molasses. I blame this on the Windows CLR (.NET) assemblies that have to load, not Git/MSYS or GitHub. Similarly, run any Java program, like Eclipse, and tell me you don’t notice that it is slower than a “pure” native app (i.e. not running on a JVM)?
- Python — Python remains to be a significant language. Many universities are no longer teaching programming and OO using Java instead are using Python. Python, being in large part, developed at Google is also one of the languages approved at Google. Note there is a bit of a schism between version 2 and 3 of Python. Many projects have not upgraded to version 3 yet. For fear I am labeled a Python fanboy, I should add that I actually find Ruby more pure and beautiful (kind of like Smalltalk). I have to be a realist though. Python still has a big user-base, especially in academia, and it has a fairly good presence on the server too. Python is also great for algorithm prototyping as well as numerical computation (using NumPy and SciPy, etc.). This is the only scripting language on the list. It is important to be very proficient in at least one such language. Python has mostly displaced Perl and is starting, along with Ruby, to eat into the PHP server space too.
Honorable mention: Ruby (beautiful like Iggy Azalea!)
I was also thinking about adding F# as an honorable mention, a somewhat new language from Microsoft, but I have to admit it mostly remains to be an experimental language too. You might think I missed Scala or Clojure, but I haven’t. I think Java will just adopt the best from those languages and remain to be king on the JVM. I’m sure others are saying you missed Haskell too.
This post was about marketable language skills. I consider Haskell, and other languages like it, to be very important to know, but not necessarily the best language that HR and hiring managers care about. In fact, many probably haven’t even heard of Haskell.
Keep in mind, pointy-headed managers don’t love code the way you do, and they aren’t reading blogs and coding on nights and weekends either. They are golfing and hanging out with their spouse at farmer’s markets and antique shops — ya know, living life.