What is the best programming language?

by

This is an endless debate. The answer is: it depends.

Information Technology, as the name suggests, is about using technology to manage, transform and delivery information. Programming languages are the tools you use to deal with that information. Just like tools, each programming language has its strengths and weaknesses.

You would use a hammer to break a wall, but never to eat, as this would prove to be very problematic. The same concept applies to programming languages. Low-level languages are not the best for highly complex systems, which is why high-level programming languages dominate this market, but they are definitely a good option for low-level systems.

Low-level, high-level, what’s that?

Programming languages are classified according to their level of abstraction, that's how much a language takes care of the small technical details for you. At least in theory, the higher the level of language, the closer it gets to human languages.

level of abstraction graph
source: researchgate.net

Take C language as example. Can you use it to write a REST API? Sure thing, but was C language developed with that in mind?

C is the de-facto programming language for low-level programming, such as scripting for drivers and kernels and it’s extremely portable as most operating systems support it out of the box. It uses a tiny amount of memory and includes direct access to machine level hardware APIs.

Although being used for low-level programming, C is not a low-level language such as Assembly. It’s considered a middle-level language because it manages to bind the gap between a machine level language and high-level languages.

Why not use Assembly then? C allows you to write programs faster as it’s more readable while providing direct access to the hardware APIs. Assembly nowadays is used only when C isn’t available (read more here).

Cool, let’s build an OS with JavaScript then!

One of the main purposes of an OS is to manage hardware access for programs running on top of it. Therefore you need direct access to the hardware APIs and JavaScript was not built with that in mind, C was. You will probably find a way to port your JavaScript code to C, so you can write an entire operating system, but it will always be an adaptation and you will face unnecessary burdens.

You can use C++ though. It’s a bit more difficult to learn than C as it has more features and encourages you to use the object-oriented paradigm which for a newcomer could be a Lernaean Hydra, but it allows you to do much more. In fact, parts of Google's Fuchsia are significantly written in C++ (read more here).

C++ is the best language?

C++ is a general programming language, so it can be used for all kinds of purposes, from OS development to web applications. However C++ is definitely not beginner-friendly, it has a steep learning curve, hard to master it quickly.

If you want to work in the gaming industry, C++ is the leader in game development for PC/Console games. The Unreal Engine for example is one of the most popular framework for creating games and it’s written in C++ (read more here).

For those interested in working in the gaming industry, C++ could be the best language for this case in specific, although there are other frameworks that uses C# and JavaScript.

Which language should I learn?

Focus on the industry you want to work in. Search what’s the most used programming languages in that industry and learn the top 3 languages of that industry if you can.

When you just want to get a job as a developer and you don’t mind which industry to work for, I would recommend looking for the most growing and in-demand languages. There are around 600 programming languages out there. The demand and popularity of programming languages fluctuate every year.

Stack Overflow Developer Survey Results is a good place to start, GitHub Octoverse is also a great place to check the most popular languages.

Code Platoon compared the Stack Overflow survey with Indeed job offerings and came up with this graph:



Therefore, as long as you master at least one or two of these languages, you should be good. Don’t fall for the “how much lines you take to write a hello world” comparisons, the easiest programming language isn’t the one with the more job postings or the better salaries.

Something else to consider?

Let’s say you have the freedom to choose the language you can use on a new project. Great! What’s the language your team already masters? Will it be CPU-intensive? Is it a web application or a mobile app? Is it going to deal with tons of requests per second? Does it need to be multi-thread? Is it going to run on cloud or on embedded systems such as an IoT device?

Nowadays it is quite common to have hybrid applications, where you have a language for the front-end, another for the back-end and other for just a specific service. It really depends on what you are doing.

The only advice I give you is: don’t follow hypes. Choose the language based on how easy it will be for your team to maintain when you are not available, how much hours will be necessary to code and debug, how much computer resources will be necessary to maintain, how mature the ecosystem of libraries is and how much “performance" the application really needs.

Some say JavaScript is X times faster than C#, some say Go is Y times faster than PHP, but really, how much does speed really matters for your application? Will it save more lives if it’s 100ms faster or decrease the operational costs a lot? How beneficial is that speed boost compared to the hours you have to put to develop and maintain?

You will always come across articles saying “Why I stopped coding in X language” or “Why paradigm X is broken” and etc. That only means that someone found a better way to handle the workload they have. It does not mean a language is bad or that you should use a new paradigm.

You are a technical person. Think technical.

Comments