Why using wrappers for D?

Adam D. Ruppe via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Oct 3 05:12:44 PDT 2016


On Monday, 3 October 2016 at 12:08:54 UTC, Chalix wrote:
> So, if there is no need for wrapper functions, why are there a 
> lot of them?


A lot of people like the wrappers as being prettier to use since 
you can turn C functions into classes and such. gtkd is an 
example of that.

> Furthermore, if there is an not very popular C library, where 
> no wrapper function exists, would it possible to include it 
> into a D project?


Of course, it is simple, just bring over the necessary struct, 
constant, and function prototypes and it just works.


More information about the Digitalmars-d-learn mailing list