User: Password:
Subscribe / Log in / New account

C11 atomic variables and the kernel

C11 atomic variables and the kernel

Posted Feb 19, 2014 9:09 UTC (Wed) by tialaramex (subscriber, #21167)
In reply to: C11 atomic variables and the kernel by epa
Parent article: C11 atomic variables and the kernel

But the _effect_ of such a flag is that C++ programmers will insist that C programmers "ought" to use the flag so as to not interfere with their pretty notion that C is just a limited subset of C++ written by Neanderthals. Which is bogus. When something provides C, it means C, not "I'm sure you can just paste this into a C++ program and that'll be fine".

If you add a Java component to a C program nobody expects that they'll just be able to import some.c.code; into the Java and have that work. If you need to access Perl from Python, or Ruby from PHP again, nobody insists that there should be some "easy" way to just mix them together as if they were merely dialects of the same language. In each case you're responsible for handling the adaptor layer. But somehow C++ programmers seem to think they shouldn't need to do this with C, let's not make this myth any easier to believe.

(Log in to post comments)

C11 atomic variables and the kernel

Posted Feb 19, 2014 9:57 UTC (Wed) by epa (subscriber, #39769) [Link]

Yes, they are different languages and anyone who says 'C/C++' usually doesn't know what they are talking about. Nonetheless there are plenty of C programmers who choose to make their code also valid C++, not because they are bullied into it by heartless C++ programmers, but as a way of getting some additional compile-time checking and warnings for odd corners of the language.

An 'intersection' compiler mode might also be useful when writing C wrappers for libraries implemented in C++.

Copyright © 2018, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds