Hacker News new | ask | show | jobs
by thatsnotc 1560 days ago
None of this is C. All of this is the OS.

Who specifies how you talk to the OS, and how native applications talk to each other? The OS does. And it does, in fact, differ across different OSes (with different calling conventions). The only reason C comes into this picture is because it runs on all the platforms these other languages do (and many more), so you can write an adapter between the language and C, and not have to worry about supporting 10 million different calling conventions, because some C compiler author has done that for you.

So the article is half right; this isn't a programming language. But C sure is.

(And that's not to mention the fact that to some extent the ABI and calling convention is determined more by the CPU architecture than the OS, much less the language!)

1 comments

C is an obsolete [1] programming language that must still be used for interoperability between languages despite not being particularly good at that.

[1] Yes it is. It is lacking many important features. And people claiming they rather not have these features are like an author writing a book with notepad.exe because they think modern Word processor are too complicated.

Notepad is absolutely not obsolete. It's far better than a heavy word processor for quickly pasting something into or jotting down a note because it's fast and has hardly any extra interface to get in the way, and has very very little bloat. This is definitely something that authors claim as well, George RR Martin writes on MS DOS because modern word processors have too many bloated features and correct his spelling.
There are tools in between a heavy word processor and a very dumb text editor. Can you even undo more than one character now? I mean, sure, for quick little edits, Ok. But don't tell me you'd write a book in notepad.

And spell checking is a good thing.

I don't think we have the same definition of "obsolete" (C is definitely not "no longer produced or used"). There is absolutely no requirement to use C and you could implement it directly in Assembly if you chose, or in many other languages (most of which pre-date C).