How to do Generic Programming in D?

Adam D. Ruppe destructionator at gmail.com
Tue Feb 22 17:17:33 PST 2011


bearophile wrote:
> Is this enough to make some C++ shops switch to D2?

If they are doing new code, it should be! For existing code, that
depends on their specific situation.

The reason I was writing C++ recently though was Qt - I wanted
to use existing code. (QtD is so, so close, but has some
showstopper bugs on Windows and doubled the size of the
distribution... so I instead wrote the GUI in C++ and the rest
of the app in D. Then I got the best of both worlds.)

> Firms that have megabytes of complex C++ legacy code are not
> going to translate it to D2 just because D2 has something nicer.

Most likely, they aren't going to translate it *at all*. There's
rarely a big benefit in translating code.

But, when writing fresh code, those nicer things add up to a big
difference.

> And there are significant problems in integrating D2 code in C++
> projects. The switch from C to C++ was much more smooth.

I don't know, I've never tried that. But integrating C++ into D2
apps isn't too bad.

> And lot of people have already stopped using static compilers
> like C++ ones and have switched to the niceties of a virtual
> machine, dynamic compilation, etc.

Their loss.


More information about the Digitalmars-d mailing list