Porting WIne to D

Gert van den Berg wine-devel at mohag.net
Wed Jun 23 16:17:53 CDT 2010


On Wed, Jun 23, 2010 at 22:58, Christopher Selph <cds.wine at gmail.com> wrote:
>>Porting a codebase the size
>>
>> >of Wine will probably take years...
>>
>> Actually I'm working on a program to convert C code to D code. You can
>> find/replace most instances of code, like unsigned int (C) with uint (D).
>> The import/include files might take some work though.

Just converting the syntax won't help much. It might compile, but it
lacks the design changes (such as proper OO) needed to properly
exploit a new language. You end up with code with the same problems as
the original, but in a language that the programmers are unfamiliar
with... (For C++, duplication of functionality in the STL is an
example of what often happens if you directly port C code)

Wine (like the Linux kernel) might be a good codebase to test your
application on (for your own testing), since it is quite a large,
complicated codebase... The chances of having it accepted into Wine is
probably quite small... (My guess would be that your chances of being
struck by lightning while winning the lottery are about equal...)

http://www.winehq.org/site/docs/winedev-guide/style-notes might give
you an idea of some of the things relatively simple patches struggle
with to get included...

Gert



More information about the wine-devel mailing list