A Random Walk Through Ada

submited by
Style Pass
2024-11-09 01:00:02

So the C programming language has been getting a lot of bad press recently; a really stupid bug in some C code has compromised some of the core security infrastructure on the internet. The fix is easy, but the knock-on effects are going to go on for years and will cost serious amounts of money. As a result, people have been asking: why are we still writing software in a language which makes writing secure, robust code so hard?

It's a fair question. We've known that C is a bad language for years. No bounds checking, a module system that's enough to make grown adults weep, a notoriously difficult-to-parse syntax, a type system which is more of a set of guidelines than anything else, a whole bunch of historical idiocies like requiring forward declarations, and so much undefined behaviour that actually writing a well-defined program is something only the experts can do...

The answer, of course, is that we've been using C because it's everywhere, and everyone knows it, and everything interfaces to it. Because it compiles down to raw machine code with practically no runtime requirements it's got very low overhead, either performance-wise or conceptually. It's ubiquitous because it's the lowest common denominator, not because it's technically superior.

Leave a Comment