A gentle critque..

Sean Kelly sean at f4.ca
Mon May 15 12:48:10 PDT 2006


Sean Kelly wrote:
> Chad J wrote:
>> Walter Bright wrote:
>>> D can link against C code right now, it just will not compile C code.
>> Sorry I didn't mean link.  Oh and I said C plus plus a lot, but I think
>> the ng cut out the plus plus.  Basically I just want to be able to
>> import .h  files and have it just work.
> 
> Please be specific.  There's a huge differencec between C and C
> insofar as D support is concerned.

"between C and C plus plus"

> For what it's worth, you only need to translate the things you need
> direct access to from D.  And in my experience, this is substantially
> less than what's typically in the header file.  I very much recommend
> working from the spec as an indicator of what should be available rather
> than simply opening the header file and going for it.  Assuming a decent
> spec exists, conversion should go pretty fast.  If no such spec exists,
> simply follow the dependencies of any functions you wish to call and do
> the conversion on an as-needed basis.  Maintaining such headers should
> typically be fairly simple as declarations rarely change across
> versions.  Simply diff between the old and new set of headers and see if
> any changes are necessary.  Often there aren't.
> 
>> I have even more trouble believing that current D compilers shouldn't
>> support C plus plus integration just because it might make C plus plus
>> compilation a required capability of a D compiler.
> 
> *cough*  Are you truly suggesting that it would be trivial to have the D
> compiler also compile C code?

I meant C plus plus



More information about the Digitalmars-d mailing list