Maybe D is right about GC after all !

ketmar ketmar at ketmar.no-ip.org
Sat Dec 23 09:33:07 UTC 2017


Russel Winder wrote:

> I think we are now in a world where Rust is the zero cost abstraction
> language to replace C and C++, except for those who are determined to
> stay with C++ and evolve it.

sorry, but it is not zero cost. we have alot of C and C++ code. converting 
it to Rust is not zero cost at all. and using it as-is won't make our 
codebases any better.

but with D, i can say that converting C code is almost zero cost. i did 
alot of C->D ports, and most of the work was done with "sed". then i have 
to run dmd and add some casts and other simple things (sure, i should 
finally write an automatic converter, but... you know that "ok, next time" 
kind of self-promises ;-).

i also ported some C++ codebases, and it is almost equally easy. mostly due 
to the fact that people tend to avoid "modern" C++ features and 
metaprogramming: it is still hard to use with C++. (with D, btw, i started 
to use templates even before i fully realised that i am using templates ;-)

what i want to say (and didn't, as usual) is that Rust is not zero cost due 
to exisiting codebases. either you have to invest alot of time and efforts 
to port those codebases, or you have to use both Rust and C/C++, and suffer 
the consequences.

and with D, you can port all your code, and use one language, investing 
*much* less efforts than you'd have with Rust/Go. plus, you'll get all the 
things D has to offer, for free.

that is, D actually has *no* competitors. if not google and mozco, people 
won't even start talking seriously about Go/Rust. yet even in this unfair 
race, D presence is constantly growing. just wait a little, and you'll see 
a dawn of Rust and Go. and D will be still there, standing strong and 
proud. ;-)


More information about the Digitalmars-d mailing list