Sure, the first version was a preprocessor on top of C and certainly that is common knowledge. But a superset? Never heard it.
ObjC on the other hand...
Sure, the first version was a preprocessor on top of C and certainly that is common knowledge. But a superset? Never heard it.
ObjC on the other hand...
As I say in the blog post, it's common knowledge for people who are experienced in writing C and/or C++ that this isn't true. But it's a misconception that persists among other programmers.
Off the top of my head, I've run into:
- C++ does not support 'foo([static N])' function declarations
- C++ does not support 'struct A a = { .b = c, ... }' initializers
The conflict arises when these are used in C headers, and then C++ programs attempt to include them.
- C++ is a superset of C, and that virtually any legal C program is a legal C++ program. https://www.tutorialspoint.com/cplusplus/cpp_overview.htm
- "C is a subset of C++." / "C++ is a superset of C." https://www.geeksforgeeks.org/difference-between-c-and-c/
- "C++ is a superset of C; (almost) anything you can do in C, you can do in C++." https://www.cprogramming.com/begin.html
- "As you recall C is a root for C++ and C++ is a superset of C." https://www.c-sharpcorner.com/article/similarities-and-diffe...
A frightening amount of [c][c++] tagging is expunged there every day.
I doubt that C++ was ever a strict superset of C. Has
int class;
ever been a valid declaration in C++? uses_BCPL_style_comments = 1 //* */ 2
;
C99's // support did not restore the superset nature.This means your "once" was almost certainly "never".