C++ to D explainer
tsbockman via Digitalmars-d
digitalmars-d at puremagic.com
Thu Oct 22 21:31:20 PDT 2015
On Thursday, 22 October 2015 at 22:29:03 UTC, Jesse Phillips
wrote:
> On Thursday, 22 October 2015 at 03:34:17 UTC, Joakim wrote:
>> Someone needs to write up a good translation of a C++ project
>> to D, showing how the code is better in D and particularly
>> demonstrating D idioms instead. The ongoing DDMD project,
>> translating the dmd frontend from C++ to D, may be a good
>> project for this, or someone might just want to translate some
>> other small to mid-size C++ project instead. A blog post
>> explaining what they did would be very worthwhile.
>
> Using the DMD translation for this may not be the best code
> base. It has been said that Walter writes his C++ in a D style.
> If nothing else, it is not what people "into" C++ would
> consider C++ style.
Also, DDMD is nowhere close to being idiomatic D yet; it's got
raw pointers all over the place, often uses `int` rather than
`bool`, all the functions are marked `extern (C++)`, use of
Phobos is forbidden, etc.
The first step was just to get it working. Refactoring the code
base into natural, streamlined D code will be a long process -
especially since fixing bugs, adding new features, and avoiding
regressions are all higher priorities for almost everyone working
on it.
More information about the Digitalmars-d
mailing list