I think best approach is to have 2-step bindings. First step is pure 1-to-1 translation with no D-ification at all. Second step is D wrapper that expresses same functionality in more native syntax (probably even more type-safe). Step-2 module imports Step-1 module of course.

Benefit of such approach is that you can generate bindings using automatic tool when new header version is out without wasting time on adjusting those to D style again and again - you only need to change step-2 module if there are some breaking API changes.

Reply via email to