D Newbie Trying to Use D with Major C Libraries

Tom Browder via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri May 16 13:27:42 PDT 2014


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


More information about the Digitalmars-d-learn mailing list