memcpy() comparison: C, Rust, and D

Mike via Digitalmars-d digitalmars-d at puremagic.com
Wed Feb 1 15:49:25 PST 2017


On Wednesday, 1 February 2017 at 21:47:58 UTC, Adam D. Ruppe 
wrote:
> (actually in the real world, it won't since nobody will care 
> enough to write `pure public return const(T) hi(return scope T 
> t) nothrow @nogc @safe @noincompetence @a_million_other_things 
> { return t; }`)

I found all the attribution of function definitions a little 
unnerving when I started learning D, but at least one other 
believed it was idiomatic D.

It makes me wonder if D has the wrong defaults (though probably a 
moot point if changing it would break code).  But, it does place 
D at a disadvantage to a language like Rust, where one has to 
opt-out of safety, while in D it appears to be opt-in.

Mike




More information about the Digitalmars-d mailing list