D Newbie Trying to Use D with Major C Libraries

Gary Willoughby via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri May 16 16:14:34 PDT 2014


On Friday, 16 May 2014 at 20:28:31 UTC, Tom Browder via 
Digitalmars-d-learn wrote:
> On Fri, May 16, 2014 at 2:31 PM, Gary Willoughby via
> Digitalmars-d-learn <digitalmars-d-learn at puremagic.com> wrote:
>> On Friday, 16 May 2014 at 19:17:05 UTC, Dicebot wrote:
>>> Using .di is more idiomatic as those are supposed to denote
>>> declaration-only interface files (with no implementation). In 
>>> practice it
>>> makes almost no difference though so many people use plain .d 
>>> by habit.
> ...
>> That's right. I always use .d files when porting C headers 
>> because i just
>> see them as regular D code. I like to classify .di files as D 
>> 'headers'
>> generated from pure D libraries (using the -H compiler 
>> switch). That's just
>> my opinion though and to be honest i don't think it matters. :)
>
> Okay, Dicebot and Gary, that makes good sense I think, thanks.
>
> So I should use the ".d" for the binding source files since 
> there will
> almost certainly be implementation code in them.
>
> Best,
>
> -Tom

Yeah , I do and Deimos does too: 
https://github.com/D-Programming-Deimos


More information about the Digitalmars-d-learn mailing list