What is D?

Meta jared771 at gmail.com
Tue Apr 9 01:03:27 UTC 2019


On Tuesday, 9 April 2019 at 00:07:33 UTC, Mike Franklin wrote:
> 3.  D MUST be @safe by default to be taken seriously.  I 
> realize it's superficial, but it matters.

I agree 100% here. Whatever breaking changes are necessary to 
make this a reality, I say we do it and yell about it ad nauseam. 
Say it with me:

SafeD is Safety

At work I've recently changed to a position in which I have more 
leverage to influence which language certain key parts of our 
product are written in. Currently that's primarily Java, with a 
collection of small services written in Go. If I had my way, it'd 
all be rewritten in D, but I need to convince the other members 
of my team that it's feasible to use D (as an aside, GC was 
actually a big plus for them - I work in cybersecurity, so memory 
safety is a core requirement for most parts of our product. 
Memory safety *without* a GC would be even better, as there are 
security concerns around data lifetime with a GC, but baby steps).

The first question I was asked was "is it memory safe by 
default?", to which the answer was painfully "no, only in code 
annotated with @safe". The inevitable follow-up is "so you have 
to mark every function with @safe?!"... not a great showing for D 
in that respect.

It's not a deal-breaker, but it already puts D on an uneven 
footing in regards to Go and Rust, which both claim full memory 
safety by default. My plan of attack is to devote a few evenings 
and weekends to rewriting one of our smaller Go services in D to 
showcase the obvious (obvious to me, anyway, and hopefully to 
others shortly after completion) benefits of the language and the 
feasibility of using D for more future work.


More information about the Digitalmars-d mailing list