porting c++ code to dpl
Simon
s.d.hammett at gmail.com
Sat Aug 6 11:27:47 PDT 2011
On 06/08/2011 19:07, bearophile wrote:
> Simon:
>
>> Unless you need pointer to members/pointer to member functions, just
>> about every bit of c++ is easier and more straight forward in D.
>
> I have had some problems when the original C++ code uses struct inheritance ("alias this" helps a bit) or multiple inheritance.
>
> Bye,
> bearophile
Most well written C++ only uses MI for pasting methods into classes; you
can mostly re-factor code like that into template mixins.
When I've come across C++ which isn't easily convertible to D, then the
original code itself is badly written and badly designed anyway, so I
don't even want to port it.
Easier just to write it again in D
--
My enormous talent is exceeded only by my outrageous laziness.
http://www.ssTk.co.uk
More information about the Digitalmars-d-learn
mailing list