Thick bingings and Deimos

Neia Neutuladh neia at ikeran.org
Thu Jan 24 16:52:18 UTC 2019


On Thu, 24 Jan 2019 10:55:06 +0000, Victor Porton wrote:
> On Thursday, 24 January 2019 at 10:52:22 UTC, rikki cattermole wrote:
>> You do not have to follow the rules of Deimos for your own
>> libraries/bindings. But I would recommend heavily to separate the
>> binding from the wrapper for cleaner code.
> 
> Huh? Create a separate module with just two-three structs and methods?

Yes. That way, you can use a tool like dstep to produce the raw bindings, 
potentially even automatically, and have it overwrite the bindings-only 
module, without having to overwrite the hand-written thick bindings.

> Are you REALLY super that binding and wrapper should be in different
> repos?

A module is a D source file, not a repository. The hint is that you have 
to write "module foo.bar;" at the top of each source file.


More information about the Digitalmars-d mailing list