DMD 1.022 and 2.005 releases

Walter Bright newshound1 at digitalmars.com
Tue Oct 9 21:10:09 PDT 2007


Bill Baxter wrote:
> While that sounds like good advice in general, if the C++ library in 
> question is mostly templates, there's not much hope of interfacing to it 
> from D.  Porting is the only option I'm aware of.
> 
> Of course some parts don't translate well and should just be rewritten 
> in a way that makes sense in D.   But once the scaffolding is in place, 
> the core, tricky, algorithmic parts that are hardest to debug become 
> easy to translate.  So in that way the D port benefits from the work 
> that went into debugging the C++.  So it's a win over just writing from 
> scratch.
> 
> OpenMesh/D is about 15-20K loc.  I ported that from C++ in about 10 
> days.  No way I would have been able to write that from scratch in the 
> same amount of time.

I'll agree (from much personal experience) that translating code is a 
far better option than rewriting from scratch, in order to get it to a 
different language.



More information about the Digitalmars-d-announce mailing list