A gentle critque..

Chad J gamerChad at _spamIsBad_gmail.com
Mon May 15 13:24:42 PDT 2006


Sean Kelly wrote:
> Sean Kelly wrote:
> 
>>Chad J wrote:
>>
>>>
>>>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"
> 

Gotcha :)

> 
>>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.
>>

OK, seems like good advice.

>>
>>>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 plus plus code?

No.  I wouldn't know.

If the objection to this sort of thing is technical, then I'm fine.
What bugs me is that the objection seems to be based on some kind of
fear that DMD's support of C plus plus would imply that other compilers
must support it.  I disagree.

It's like saying that if I were to make an external tool to translate C
plus plus headers to D, that it would automagically become part of the
language spec and everyone would have to use it forever.



More information about the Digitalmars-d mailing list