15 points · by pjmlp · 2y ago · 13 comments
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?"
We're stuck with C until someone builds something more important than Linux using some other language.
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.
SPARC ADI, ARM MTE and CHERI are the only ones doing it right.
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).