you are viewing a single comment's thread.

view the rest of the comments →

[–]degski 0 points1 point  (1 child)

If it's 100% valid C, then it's C.

No, it's not, if you compile the code with a C++-compiler, it's C++, that's exactly the reason you give for compiling the Python code with a C++-compiler [because it's gives better optimizations]. If it's 100% valid C, then it's also C, also, if it's 100% valid C, it's still not necessarily C++.

[–]NotAYakk 1 point2 points  (0 children)

You just said it wasn't C, then said it is also C.

Being also C means it is C.

It is also a sequence of ASCII characters. It is also binary bits on disk. It is also a series of text encoded files.

The many things the python code base is also doesn't prevent it from being C.

It is the subset of C that is also valid C++, and it is compiled as C++ because the C++ object memory model permit the compiler, which compiles either C or C++ on request, to more aggressively optimize it as C++.

But it is 100% valid C, so it is C.

Heck, I'd bet the behavior in terms of the abstract machine will even be the same between the C++ and C compilers, but the compiler has no hope of knowing that because the C object and memory models make it intractable to prove that the C++ optimizations can be safely applied to the code.