> If your software blows up, in a way Rust would have prevented, and caused damages, isn't it kind of fair someone say "Hey maybe you shouldn't be using C"?
No, that would not automatically be fair. It depends on context.
> But if it is, and Rust exists, and could work just as well in that environment?
But that's what I am saying: Rust won't work as well in that environment.
My stretch goal is to have my build system replace the awful custom Makefile build for FreeBSD. In that context, Rust doesn't exist, even if they add it to the base system because something would have to build Rust and LLVM.
Same reason my bc is in C: it is used to build the Linux kernel.
Anyway, who defines if Rust works "just as well" in an environment? It all depends on context. You can't say that any Tier 1 and Tier 2 platform must use Rust for reasons such as the one I laid out above.
And what if my language succeeds and has more bug smashing power than Rust? Should the directive immediately be, "If any Rust project causes damages that Yao could have prevented, that project owner is liable"?
Of course not.
> > But C projects shouldn't have to be perfect on that front. Just close enough. Maybe 10% or less.
> Why?
Call it a hunch, but roughly, I think that a C project that reduces its memory bugs to that much would have fewer vulnerabilities than an equivalent Rust project, just because it would smash a lot of non-memory bugs along the way.
That is the criteria that should be used: how many bugs does it have per KLoC, number of statements, cyclomatic complexity, whatever.
Otherwise, you're just effectively mandating Rust anyway, and Rust projects could get away with murder.
But set an objective criteria like that, and SQLite and Curl would survive, I would make my project hit it, and poorly done Rust projects would have to clean up their act.
IOW, I do agree that Rust should be the default, but we shouldn't choose a metric that is clearly biased in its favor.