A gentle critque..

Ben Cooley Ben_member at pathlink.com
Mon May 15 07:47:26 PDT 2006


In article <14fakmish13b0.1mid2engjqpes.dlg at 40tude.net>, Derek Parnell says...
>
>On Sun, 14 May 2006 23:22:56 -0700, Walter Bright wrote:
>
>> Derek Parnell wrote:
>>> But all joking aside, it just occurred to me that Digitalmars already has a
>>> tool that accesses C/C++ headers ... the DigitalMars C++ compiler! So I'm
>>> wondering if Walter could provide a new utility that can help us automate
>>> translation of C/C++ headers into D source code?
>> 
>> There's no way to do that with C++ - just take a look at any Boost 
>> headers :-). It is possible to do a 90% automatic translation of C headers.
>
>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.

Well, what you have is both several full C/C++ parsers and full compilers out
there (for example the Digital Mars Compiler or GCC), AND full control of the D
language specification.  

The incompatibility with C plus plus is a current design decision.  It really
doesn't matter in the grand scheme of things.. C plus plus will be the language
of choice simply because it integrates and can use exiting code, and is good
enough at everything else.  D will continue neither being able to parse C and
C++ header files or integrate with C++, and remain not widely used.






More information about the Digitalmars-d mailing list