3 ms·
> Switching to a new compiler is a very high burden for a lot of projects ... By contrast, switching to a new language ... is also a very high burden, but the
by dig1 9y ago
> Switching to a new compiler is a very high burden for a lot of projects ... By contrast, switching to a new language ... is also a very high burden, but the benefits are larger
I guess switching to a new compiler (or newer version of the same vendor) is much less burden than switching to the new language.
Don't forget that all "new safe languages" are simply new. Why people like C is familiarity: known practices and known issues to avoid ironed out through 30 years of usage.
Although Rust/JavaScript/your-favorite-new-language brings on table fixes for known C issues, they introduces many unknown things. Remember Java? It promised compile-once/run-everywhere, automatic memory management approach, but introduced bloat, extremely hard to catch GC leaks no one talks about, JVM implementation differences (Oracle JVM vs IBM JVM vs OpenJDK speed) and JVM security issues only few can fix.
> why safer versions of C have repeatedly failed over the years
I guess this will be like giving to skilled hunter a toy water gun - simply a different mindset. Imagine unsafe python with pointers and mallocs; how python devs would deal with it?
- pcwalton 9y ago> I guess switching to a new compiler (or newer version of the same vendor) is much less burden than switching to the new language. If that were true, then Linux distros wouldn't still be using GCC. Switching to a new compiler (like clang) is a huge burden. Both switching compilers and switching languages are enormously expensive, to be sure. But I think people (especially people in academia) consistently underestimate the cost of switching compilers and overestimate the cost of writing new components in a different language. > Don't forget that all "new safe languages" are simply new. Why people like C is familiarity: known practices and known issues to avoid ironed out through 30 years of usage. Most programmers haven't been programming for 30 years. New programmers, by and large, don't even know C anymore. The problems with C haven't been so much "ironed out" as ignored since C99. > Remember Java? It promised compile-once/run-everywhere, automatic memory management approach, but introduced bloat, extremely hard to catch GC leaks no one talks about, JVM implementation differences (Oracle JVM vs IBM JVM vs OpenJDK speed) and JVM security issues only few can fix. You bring up Java as though it were a failure! Java has in fact been beating C++ in total usage for years. If I could point to one thing that was responsible for kickstarting the slow decline of C++ that has continued to this day, Java would be it.
- panic 9y agoIf that were true, then Linux distros wouldn't still be using GCC. Switching to a new compiler (like clang) is a huge burden. FreeBSD switched to clang, and could (with some work) be made to use whatever safe C compiler people come up with. That's much easier than rewriting the entire FreeBSD system in a new language.
- flukus 9y ago> If that were true, then Linux distros wouldn't still be using GCC. You're presupposing they want to switch. Most of the switchers to clang seem to have done so for ideological reasons more than anything. Never the less, most of debian can be built with clang: http://clang.debian.net/ http://clang.debian.net/
- dig1 9y ago> If that were true, then Linux distros wouldn't still be using GCC. Simply because there is no better alternative (clang doesn't bring anything new). However, distros switched to egcs fork when gcc wasn't up to date. > New programmers, by and large, don't even know C anymore. New programmers are interested in web, just like they aren't interested in desktop GUI development. Should I say that desktop is dead? I don't see we are booting usable machines in browsers yet. > The problems with C haven't been so much "ironed out" as ignored since C99. I think you need to hang more with embedded/kernel/C devs more and get insight into their mindset. They aren't interested in new stuff as much as in language stability. > You bring up Java as though it were a failure! Java has in fact been beating C++ in total usage for years. You read it wrong - I haven't said Java failed, but introduced new stuff to cope with. Java should thank it's popularity to huge ecosystem and library, Sun's aggressive marketing, jvm and extreme language stability. > If I could point to one thing that was responsible for kickstarting the slow decline of C++ that has continued to this day, Java would be it. Did I mention C++ here?