Eric S. Raymond tweet on current C safety issues
twitter.com
twitter.com
Then we get languages with Opinions and "you can't do that 'cuz its Wrong;" or in the enlightened "free" languages, "you can do that, but only after a bunch of syntactic apologia and Guilt."
But the simple "C with bounds checking" answer doesn't fly because "why go to the trouble for a tiny, incremental gain?"
SPARC ADI, ARM MTE and CHERI are the only ones doing it right.
We're stuck with C until someone builds something more important than Linux using some other language.
It even ported C's (lack of an) error handling model.
The thing Go isn't very good at is writing operating systems or firmware or other things with very strict memory requirements, so I don't see it replacing C in those domains. I'm not sure what will. I wonder if it will be Zig, because every time I see some Zig code it looks comfortable and familiar to me (as a long-lapsed C programmer) but also better, which is a similar feeling I had when I first saw Go.
Go was pretty explicitly designed by Google as a replacement for both C++ and Java in application code. It beats Java by having compiled executables with no JIT warmup, and it beats C++ by having memory safety (especially in the pre C++11 days when Go was designed).
A bunch of Go's design decisions seemed to be in reaction to the complexity that emerges in Enterprise/OOP Java, C++, and C# codebases. Therefore, no classes, no exceptions, and no generics until very recently. All that makes coding in Go feel like you're writing "new C". (Ken Thompson and Rob Pike being one the core team for Go probably also added to this).
Go does not and cannot replace C/C++/Rust family of languages, nor can it replace C# at writing higher-level HPC code (lack of cross-platform SIMD API, zero-cost interop, hardware intrinsics, etc.), something you do to drastically reduce the maintenance effort compared to doing so in C++.
And lastly it's still unfortunate it replaces JVM family which goes to show how abysmal the basics of dev UX are in some aspects of it, because it has the most advanced JIT compiler implementations that Go will never be able to compete with.
Java, C++, Python and nowadays Rust, are the key programming stacks.
Java has had AOT compilation since early 2000's, however it was gated behind commercial JDKs, like Excelsior JET.
Nowadays free beer AOT is available in GraalVM, OpenJ9, and Android since version 5.
It doesn’t look like C with an extra feature or two, so it doesn’t get dismissed as an incremental improvement that could be DIYed in C instead (at least not by people who understand what Rust does).
Safety helps justify use of Rust it in places where this is important, but developers stick with it for all the other quality of life improvements.
If you only fix safety in C, you’ll still have C, with all the 1970’s clunkiness.