3 ms·
The C that you call "really is better" is not the C which existed before C++. It is "K&R C", which looked like this: foo (a, b, c) char *a; int b, c;
by AdieuToLogic 11y ago
The C that you call "really is better" is not the C which existed before C++. It is "K&R C", which looked like this:
foo (a, b, c)
char *a;
int b, c;
{
/* do something cool here */
}
And there were no "function declarations" (who needs argument type and cardinality checking anyway), no "slash slash" single line comments, no need to declare a return type as int was implied, say goodbye to const and volatile qualifiers, any char array is mutable (including those defined in double quotes), plus be sure to use function pointers thusly:
(*some_pointer) (insert, args, here);
Instead of:
some_pointer (looks, like, a, function);
Oh yeah, and say adios to struct initialization using the C89 syntax. And it's a no-no to try and initialize a local array along the lines of:
char *strings = {
"this", "is", "convenient", "isn't", "it?"
};
So if you wish to assert (pun intended) "that plain-old C really is better", then be sure to acknowledge where a non-trivial amount of what is known as "plain-old C" stems from.
- exacube 11y agoby plain old, i think infradig was implying that C was plain and old compared to C++, and not about an older standard of C.
- ectoplasm 11y agoYes, plain-old C like plain-old vanilla ice cream, as compared to C++ like swirly rainbow vanilla chocolate strawberry template macro class inherits from a waffle cone with generic unique pointer functor sprinkles ice cream.