Using out qualifier instead of *, how to pass null?

Anders F Björklund afb at algonet.se
Thu Feb 1 02:28:52 PST 2007


Kirk McDonald wrote:

> I would recommend binding the C API as closely as you can, and then 
> using D's features in a wrapper around it. Generally speaking, this will 
> be the most robust and portable approach. It will give you the 
> convenient D version for most uses, and the raw C version when you need 
> that.

Having just rewritten parts of wxD, I second recommending that approach.
(for wxWidgets it had to be done anyway, because it's a C++ API library,
but generally speaking it is easier to keep each language to its own...)
This normally also includes offering legacy aliases, for C portability.

--anders

PS. Rick, for your API wrapper you might find this article interesting:
http://www.eclipse.org/articles/Article-SWT-Design-1/SWT-Design-1.html
Bonus points are awarded for completing the Mac OS X DWT port to Carbon,
that Carlos started on: http://dsource.org/forums/viewtopic.php?t=1169


More information about the Digitalmars-d-learn mailing list