A gentle critque..

BCS BCS at pathlink.com
Mon May 15 14:56:07 PDT 2006


Walter Bright wrote:
> Derek Parnell wrote:
> 
>> May I repeat a portion of my post please ...
>>
>>     "a new utility that can **help** us automate
>>      translation of C/C++ headers into D source code"
>>
>> I know that 100% automated translation is not practical. However, as
>> DigitalMars already has a C/C++ parser that works, I was thinking that a
>> tool based on that parser to created a best-effort translation and
>> highlighted that which needs human effort might be a useful addition 
>> to the
>> D tool set. Whatever you have now as a C/C++ parser has got to be better
>> than writing a new one from scratch. I'm not asking for the source 
>> code for
>> that parser, just a tool that would output something that could be 
>> tweaked
>> into D code by either (or both) another tool or person.
> 
> 
> One of my concerns about me writing such a tool is that people will have 
> too high expectations of it, and when it fails to deliver 100% automated 
> conversion, it'll give the rest of D a bad image.
> 
> The first thing someone new to D will do is try to run the converter 
> across all their C header files. The converter will fail miserably. 
> They'll just dismiss D as a buggy piece of ****.


What do ya think new D users would think about a converter that does 
100% correct convention of a sub set (+10%) of C (and maybe cpp) code? 
Say just global function prototypes, structs typdefs (c style) and 
anything else that would be easy to get right. Some of the stuff (in C, 
the most common stuff) translates directly, and shouldn't be that bad to 
translate.



More information about the Digitalmars-d mailing list