Reply to post: Re: Why are people still writing ordinary C?

Apple's Swift creeps up dev language survey – but it's bad news for VB

thames

Re: Why are people still writing ordinary C?

Why do people use C?

a) C++ has big problems with third party binary compatibility. If you're writing a library, most languages can call C binary libraries fairly painlessly. C++ on the other hand can be a major headache, and even when possible the documentation to do so is sketchy or non-existent.

b) You need to do low level stuff which isn't supported in C++. C compilers often have extensions specifically for this which become de-facto standards, even if they're not in the C language specification.

c) You need very tight control over how memory is being handled, or over how instructions get executed. It's safer to use C than to add a comment in a C++ program asking people not to use certain language features and then praying that they listen to you.

There are no doubt many other reasons, but "a" is the main one that I run into. I'm sure that C++ is a perfectly good language in the right applications, but there's no such thing as a "one size fits all" language, which is why we have so many different ones.

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon