News for hackers. Stuff that matters.
Re:Wuffs’ PNG image decoder by WalterBright on Tuesday April 06, 2021 @06:34PM (#26718231)
> I'm a big believer in technical continuity.

So am I. D is designed to be an easy transition from C and C-With-Classes. For example, here is some code in C that was translated to D (it's part of the Digital Mars C++ compiler):

C:

https://github.com/DigitalMars/Compiler/blob/dmc-cxx/dm/src/...

D:

https://github.com/DigitalMars/Compiler/blob/master/dm/src/d...

They look pretty much the same. The code generated is the same. In those repositories you can also see how I translated the C versions to D with plenty of examples.

The biggest impediment is the C preprocessor. You wouldn't really want to carry that forward.

After removing dependency on the C preprocessor, most of the work is global search/replacing things like `->` to `.`.

There are no comments on this comment yet.