Sane API design (AKA C's #ifdef hell)
Dejan Lekic
dejan.lekic at gmail.com
Fri Apr 17 11:54:32 UTC 2026
On Friday, 17 April 2026 at 10:32:37 UTC, Dennis wrote:
> I'm looking at https://github.com/nigels-com/glew/tree/master
> and https://github.com/BindBC/bindbc-opengl, and I wouldn't say
> either is a winner.
Your example is a tip of the iceberg. People who read this thread
would see your reply and think "ah, it is not so bad". I
encourage them to look at the bindbc-opengl to understand how
difficult it is to do good bindings for D. I've learned this the
hard way over the years, and my latest bindings (HDF5 library)
have shown me how difficult it really can be, and irony is -
libhdf5 is not _that_ complicated compared to some other
libraries that heavily rely on C preprocessor and have insane
macros that are actually critical part of the "library".
More information about the Digitalmars-d
mailing list