Developers
October 6, 2020

Why C Is Still an Important Language

Why the old workhorse continues to be chosen for ground-breaking projects despite newer options.

Elon Musk made headlines with his demonstration of Neuralink, a technology designed to help interface brains with computers. Musk has been a long-time critic of the development of artificial intelligence (AI), a consistent voice calling for regulation of the technology.

Musk has made no secret of his belief that AI is the biggest existential threat humanity is facing. He has postulated that, as AI gains in ability and autonomy, countries may rely on it more and more, even trusting their arsenals to AI control. Musk believes that would be a critical mistake, as an AI may come to the conclusion that a preemptive strike is the best path to victory, paving the way for World War III.

As a result, one of the driving motivating factors in Neuralink’s development is a desire to help humanity keep up with AI and avoid a species-ending conflict. From Musk’s perspective, Neuralink is not a vanity project or a random science fiction concept brought to life. It’s critical technology that may ultimately save humanity.

The Critics Speak

With so much at stake, it surprised many to learn the interface was written in C/C++.

”they’re using C/C++ too lmao

”just imagine that — a bluetooth driver written in C++ that lives within your brain

— Jamie Bishop (@jamiebishop123) August 28, 2020

Within short order, multiple critics were decrying the choice of C/C++, especially in lieu of newer languages, some even claiming the choice of language was indicative of a lack of commitment to the project.

”For this kind of devices, I would expect a new kind of language and a new kind of communication protocol, one that is so simple that can be proved formally. I guess they didn't take this project seriously enough.”

— Chaoji Li (@litchiedev) August 30, 2020

John Carmack Responds

None other than John Carmack quickly weighed in on the debate. Carmack is one of the most respected programmers in the industry today, and is the founder of id Software. He highlighted some of the advantages of C/C++.

“Quality, reliable software can be delivered in any language, but language choice has an impact. For me, C would be a middle-of-the-road choice; better than a dynamic language like javascript or python, but not as good as a more modern strongly static typed languages. However, the existence of far more analysis tools for C is not an insignificant advantage. If you really care about robustness, you are going to architect everything more like old Fortran, with no dynamic allocations at all, and the code is going to look very simple and straightforward.”

— John Carmack (@IDAACarmack) August 29, 2020

Needless to say, in today’s internet culture, even Carmack’s stature wasn’t enough to end the debate. Instead, supporters on both sides continued to make their arguments.

Why the Debate

There are a number of reasons why many programmers are shunning C/C++ in favor of newer languages.

One of the biggest is the lack of objected oriented programming (OOP) principles. Unlike most newer languages, C is a procedural language. While C++ is considered an OOP language, it doesn’t enforce that approach as much as some other languages, such as C# or Java.

In addition, both of these languages are relatively low-level, with very little abstraction. As a result, they can be challenging for new programmers to learn, let alone master.

C also lacks a number of features that newer programming languages have, such as exemption handling. Exemption handling helps a programmer catch errors, bugs and anomalies and handle them gracefully. Similarly, C does not have runtime checking, only compile time checking. As a result, it can quickly become a monumental task debugging large applications.

Why C Has Such Staying Power

Given how many newer languages have significant advantages over C/C++, many developers wonder why the two older languages have such staying power.

Some of the very things that make these languages less popular are exactly why they are so powerful. C/C++ are very low-level languages that provide capabilities that are difficult to match with other options. While not as low-level as Assembly, C still provides access to system resources in ways that other, more modern languages don’t. This includes access to system memory and low-level hardware access. As a result, C is often considered the gold standard for performance.

Because C has virtually no abstraction, unlike modern languages, it is extremely portable. C applications can easily be ported from one platform to another. In fact, there is virtually no platform in existence today that isn’t based, at least in part, on some C/C++ code.

In addition, Carmack hits on one of C’s biggest advantages: existing libraries. C is one of the oldest languages in existence. Because of its age, there’s a wealth of existing libraries, frameworks and tools available for C programmers. These include the analysis tools Carmack references.

Conclusion

C/C++ may be dinosaurs, in terms of programming technologies, but that doesn’t mean they don’t have a valuable role in today’s software development.

Many modern languages are designed to have an easier barrier-to-entry than the old standbys, and provide layers of abstraction to make it faster and easier to develop with them. While convenient, there are times when there’s no alternative for the type of low-level access that C/C++ provides.

While C/C++ may be harder to learn and require programmers to be more careful, there’s a good reason the venerable standbys continue to be so popular—for general development and for projects that may save humanity.

TagsCC++Programming Language
Matt Milano
Technical Writer
Matt is a tech journalist and writer with a background in web and software development.

Related Articles

Back
DevelopersOctober 6, 2020
Why C Is Still an Important Language
Why the old workhorse continues to be chosen for ground-breaking projects despite newer options.

Elon Musk made headlines with his demonstration of Neuralink, a technology designed to help interface brains with computers. Musk has been a long-time critic of the development of artificial intelligence (AI), a consistent voice calling for regulation of the technology.

Musk has made no secret of his belief that AI is the biggest existential threat humanity is facing. He has postulated that, as AI gains in ability and autonomy, countries may rely on it more and more, even trusting their arsenals to AI control. Musk believes that would be a critical mistake, as an AI may come to the conclusion that a preemptive strike is the best path to victory, paving the way for World War III.

As a result, one of the driving motivating factors in Neuralink’s development is a desire to help humanity keep up with AI and avoid a species-ending conflict. From Musk’s perspective, Neuralink is not a vanity project or a random science fiction concept brought to life. It’s critical technology that may ultimately save humanity.

The Critics Speak

With so much at stake, it surprised many to learn the interface was written in C/C++.

”they’re using C/C++ too lmao

”just imagine that — a bluetooth driver written in C++ that lives within your brain

— Jamie Bishop (@jamiebishop123) August 28, 2020

Within short order, multiple critics were decrying the choice of C/C++, especially in lieu of newer languages, some even claiming the choice of language was indicative of a lack of commitment to the project.

”For this kind of devices, I would expect a new kind of language and a new kind of communication protocol, one that is so simple that can be proved formally. I guess they didn't take this project seriously enough.”

— Chaoji Li (@litchiedev) August 30, 2020

John Carmack Responds

None other than John Carmack quickly weighed in on the debate. Carmack is one of the most respected programmers in the industry today, and is the founder of id Software. He highlighted some of the advantages of C/C++.

“Quality, reliable software can be delivered in any language, but language choice has an impact. For me, C would be a middle-of-the-road choice; better than a dynamic language like javascript or python, but not as good as a more modern strongly static typed languages. However, the existence of far more analysis tools for C is not an insignificant advantage. If you really care about robustness, you are going to architect everything more like old Fortran, with no dynamic allocations at all, and the code is going to look very simple and straightforward.”

— John Carmack (@IDAACarmack) August 29, 2020

Needless to say, in today’s internet culture, even Carmack’s stature wasn’t enough to end the debate. Instead, supporters on both sides continued to make their arguments.

Why the Debate

There are a number of reasons why many programmers are shunning C/C++ in favor of newer languages.

One of the biggest is the lack of objected oriented programming (OOP) principles. Unlike most newer languages, C is a procedural language. While C++ is considered an OOP language, it doesn’t enforce that approach as much as some other languages, such as C# or Java.

In addition, both of these languages are relatively low-level, with very little abstraction. As a result, they can be challenging for new programmers to learn, let alone master.

C also lacks a number of features that newer programming languages have, such as exemption handling. Exemption handling helps a programmer catch errors, bugs and anomalies and handle them gracefully. Similarly, C does not have runtime checking, only compile time checking. As a result, it can quickly become a monumental task debugging large applications.

Why C Has Such Staying Power

Given how many newer languages have significant advantages over C/C++, many developers wonder why the two older languages have such staying power.

Some of the very things that make these languages less popular are exactly why they are so powerful. C/C++ are very low-level languages that provide capabilities that are difficult to match with other options. While not as low-level as Assembly, C still provides access to system resources in ways that other, more modern languages don’t. This includes access to system memory and low-level hardware access. As a result, C is often considered the gold standard for performance.

Because C has virtually no abstraction, unlike modern languages, it is extremely portable. C applications can easily be ported from one platform to another. In fact, there is virtually no platform in existence today that isn’t based, at least in part, on some C/C++ code.

In addition, Carmack hits on one of C’s biggest advantages: existing libraries. C is one of the oldest languages in existence. Because of its age, there’s a wealth of existing libraries, frameworks and tools available for C programmers. These include the analysis tools Carmack references.

Conclusion

C/C++ may be dinosaurs, in terms of programming technologies, but that doesn’t mean they don’t have a valuable role in today’s software development.

Many modern languages are designed to have an easier barrier-to-entry than the old standbys, and provide layers of abstraction to make it faster and easier to develop with them. While convenient, there are times when there’s no alternative for the type of low-level access that C/C++ provides.

While C/C++ may be harder to learn and require programmers to be more careful, there’s a good reason the venerable standbys continue to be so popular—for general development and for projects that may save humanity.

C
C++
Programming Language
About the author
Matt Milano -Technical Writer
Matt is a tech journalist and writer with a background in web and software development.