4 ms·
The barrier to displacing any language is so high that you should consider such an endeavour to be a decades-long effort with a low chance of success. The best
by jmyeet 5y ago
The barrier to displacing any language is so high that you should consider such an endeavour to be a decades-long effort with a low chance of success. The best you can probably hope for is for something to live in a similar space and being large enough to be viable.
Existing code and existing engineers are a massive barrier-to-entry.
One trap engineers fall into is we tend to view exaggerate the importance of certain problems. Verbosity in Java is a big one. IDEs fill it in for you. It doesn't slow you down. It's a complete non-issue.
Zig is interesting. I don't know a ton about it. My sense is that Zig is to C what TypeScript is to JavaScript. I mean Zig isn't transpiled into C but the point is that it seems to be very closely related so transition should be fairly easy.
Rust most closely competes with C++ (IMHO) but it does something really interesting that C++ just can't do: it tackles ownership and memory safety at compile-time. Yes, C++ has smart pointers but these incur a runtime cost. C++'s features, history and (dare I say it?) baggage mean C++ can't do the same thing.
I personally consider this to be an increasingly important issue so Rust has a definite niche. But will it displace C++? The odds aren't in its favor. But it will certainly be viable.
C is the funniest one though. Asking "Will X replace C?" is a bit like "Will [search startup] replace Google?" The startup landscape is littered with the ocrpses of Google-killers. Likewise the language landscape is littered with the corpses of C-killers. So my money is on "no".
- bachmeier 5y agoI think D's approach is the right one. It's not a replacement for C, it's a supplement, with no barrier to entry. You can do all of the following: compile C code and call it directly from your D program (no bindings needed), compile D code and run it directly from your C program (no bindings needed), write C code using basically the same syntax but with some additional features (betterC), or write a D program and interoperate with C libraries without writing bindings. I think a lot of C programmers dislike some parts of the language - something that's true of any language - but they like writing C code the way they have for the last X years. If they're willing to give up the preprocessor, they can keep using C. There's no need to replace C. D has support for all the platforms of GCC and LLVM. That's obviously not as many as C, but it's a lot.
- tasuki 5y ago> Verbosity in Java is a big one. IDEs fill it in for you. It doesn't slow you down. It most definitely does! Perhaps not when writing code. But it does take longer to read/scan verbose code. I'd also argue many kinds of refactoring are made slower by verbosity.