Migrating dmd to D?

Jacob Carlborg doob at me.com
Thu Feb 28 23:30:53 PST 2013


On 2013-02-28 20:28, Arlen wrote:

> Having ported Boost.units to D, I can attest to this being a lot of
> work.  I did try translating first and then refactoring the code, but
> that did not go well, mainly because of all the tricks and hacks
> employed when doing template meta-programming in C++ that did not
> translate well at all to D.  With my first attempt I pretty much ended
> up with C++ code that was written in D, and that's not what I wanted.
> So I had to start over, refactoring and writing D code in D as I went.
> The problem with refactoring is that once you refactor a piece, chances
> are that you will need to refactor everything that depends on the code
> that was refactored, and that starts a domino effect.

That sounds more like one needs to figure out the intent of the code and 
not just look at the exact syntax. An easy example. C++ supports 
multiple inheritance, D does not. Trying to emulate that will most 
likely cause a lot of problem. But the use case in C++ could just be 
interfaces.

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list