5 ms·
Even C has to deal with this. But is there any C11 compiler out there that will refuse to compile C99?
by chongli 10y ago
Even C has to deal with this.
But is there any C11 compiler out there that will refuse to compile C99?
- AstralStorm 10y agoPython is an interpreted language, so the comparison is meaningless. It is cheap to deal with the ambiguity in the compiler using compile options. You could go the Java way and have separate class path (e.g. In PyPy, as CPython 2.x is dead). But this does not allow you to mix and match code for older version anyway. Java was designed from start to allow this and it is why it's so stagnant.
- chongli 10y agoPython is an interpreted language, so the comparison is meaningless. Bash has no problem running old Bourne shell scripts from ancient history. Browsers have no problem running JavaScript from the mid-90s. I fail to see how being an interpreted language is a valid reason for breaking backwards compatibility.
- aangjie 10y agobeing interpreted is not a valid reason, but the string class for both bytes and text is a valid reason.
- kbenson 10y agoI used C as an example of what happens when you don't change, not what happens when you do. C is used decades later with little change because of momentum and history, not because it's the pinnacle of computer languages. C is not a good language. It was a good language, but that was a few decades ago. We've progressed past the point where C's shortcomings are excused by there not being alternatives that address those shortcomings while offering comparable features. At this point, we're just finally edging past of the local maxima created by C's exceptional popularity and the knock-on effects of that popularity, such as most operating systems (and all popular open source ones) being written in C.
- flukus 10y agoWhat's replacing C? I can see languages like go/rust/crystal replacing C++ for application development, but what's producing stable binaries that other languages can consume in the same way the do C ones?
- kbenson 10y agoRust can produce C compatible libraries. Go apparently can too. I suspect a little googling would show me that Nim and D can as well. I'm sure there are at least a few more.
- majewsky 10y agoGo can use C libraries, but AFAIK it cannot be compiled into a shared library to be used by a C program. Go needs control of the program flow to orchestrate its runtime (esp. the GC). Nim can definitely produce C-compatible libraries, seeing how it compiles to C itself.
- mixedCase 10y ago>but AFAIK it cannot be compiled into a shared library to be used by a C program. Go 1.5 added support for this.
- flukus 10y agoI didn't know rust could, I just checked it out. I didn't realize rust was that low level.
- petre 10y agoInterfacing D to C and C++ is failry easy as it was built with excellent C/C++ interop in mind. It's also compatible with C ABI and has limited compatibility with C++ ABI.