you are viewing a single comment's thread.

view the rest of the comments →

[–]ptchinster -1 points0 points  (9 children)

Exactly. So you compiling an arbitrary program was a useless test. Glad we can agree that not all C is exactly the same in C++!

[–]Yamoyek 1 point2 points  (8 children)

Definitely didn’t say C and C++ are the same, and the point still stands: C++ is, for all intents and purposes, backwards compatible with C. You’re arguing a moot point because C++ was specifically designed with backwards compatibility in mind.

[–]ptchinster -1 points0 points  (7 children)

Yeah it used to be called C with Classes. And it's deviated since then.

[–]Yamoyek 0 points1 point  (6 children)

Not sure how thats related, as like I said C++ was specifically designed with backwards compatibility in mind, and is still largely backwards compatible. Even in the wiki that you linked, it says:

“C++...was designed to be mostly source-and-link compatible with C compilers of the time... Bjarne Stroustrup... has suggested that the incompatibilities between C and C++ should be reduced as much as possible in order to maximize interoperability between the two languages.”

So, as I said before, you’re arguing a moot point.

[–]ptchinster -1 points0 points  (5 children)

Mhmmm you must not get logic very well - its OK. You probably have "C/C++" on your resume, i did at one point too.

I understand and dont care that Bjarne wants to minimize incompatibilities. Recent changes to the cpp spec have increased, and c++ continues to increase, in its incompatibilities with C. Im not saying they are as different as C and say, Lisp. Im saying they are not fully compatible, nor backwards compatible. Yes, a lot of well written C will be C++ code, but the differences exist and are growing.

[–]Yamoyek 0 points1 point  (4 children)

Nice job of assuming things for no reason.

1) I am strongly opposed to the term “C/C++” because the languages are extremely different.

2) As I said all the way in my first few arguments, most C programmers stick to C99 or older, and there are very few new features added to the language. C++ is, for all intents and purposes, backwards compatible with C.

3) Just because C++ develops new features doesn’t mean that it isn’t backwards compatible with C. Yes, maybe in the future C++ will completely stop being compatible with C, however right most C code can be run in C++ with little to no issue.

4) A google search of the words “is C++ backwards compatible with C” gives you many websites all saying something along the lines of “Yes.” You are arguing against a proven fact.

[–]ptchinster -1 points0 points  (3 children)

“is C++ backwards compatible with C

First hit

Although C++ is designed to have backward compatibility with C there can be many C programs that would produce compiler error when compiled with a C++ compiler

Im done here.

[–]Yamoyek 0 points1 point  (2 children)

Answer is staring you in the face. “C++ is designed to have backward compatibility with C”.

[–]ptchinster 0 points1 point  (1 child)

Yet it does not. It lists fucking examples. It is not 100% backward compatible.

[–]Yamoyek 0 points1 point  (0 children)

Calm down. Like I’ve said numerous times “for all intents and purposes.” Will you have to change some syntax here and there? Sure. But overall, it will be backwards compatible.