in reply to Re: Perl6: Choosing language version in the shebang line?
in thread Perl6: Choosing language version in the shebang line?
If you mean that C++ is a "different" language than C, that is wrong. C++ is a superset of C. This backward compatibility required a lot compromises. Ancient C code will compile using a C++ compiler.
Sorry, but while most C code will compile using a C++ compiler, C++ is not a superset of C, and there is code that a C++ compiler won't compile successfully. There are C constructs that a C++ compiler will refuse; and extensions of newer C standards (like C99) are not available in a C++ compiler. Also, some constructs behave differently in C and C++.
There is a long article in the Wikipeda explaining the Compatibility of C and C++.
Also, C is not a subset of C++, according to Bjarne Stroustrup, creator of C++.
Alexander
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Perl6: Choosing language version in the shebang line?
by Marshall (Canon) on Feb 23, 2017 at 21:04 UTC |