Could D have fit Microsoft's needs?

JN 666total at wp.pl
Fri Jul 19 07:23:32 UTC 2019


On Thursday, 18 July 2019 at 23:00:03 UTC, bauss wrote:
> Microsoft has published article about needing a safer system 
> programming language.
>
> https://msrc-blog.microsoft.com/2019/07/18/we-need-a-safer-systems-programming-language/
>
> Could D (Most likely as betterC) have fit into that domain OR 
> is it not yet safe?

I don't think D can compete on this with Rust. Yes, D has safety 
features built-in the language, but they are opt-in. Rust has the 
safety features opt-out. Now both approaches have their 
advantages of course. D is more pragmatic and lets you write code 
without fighting the borrow checker each step of the way.

But from the safety perspective, since Rust mandates safety, you 
can look at the codebase, and focus on the unsafe blocks for 
auditing. In case of D it wouldn't be that simple. Sure, you can 
@safe sections of code, but it's harder to find which sections 
are safe and which aren't compared to Rust where everything is 
safe by default and you look for the unsafe ones.

BetterC... it occupies that weird spot between C and D. I think 
it has some usecases (the no GC/runtime part works wonders for 
things like WebAssembly), but I don't think it's a production 
ready solution.


More information about the Digitalmars-d mailing list