Sane API design (AKA C's #ifdef hell)
Dejan Lekic
dejan.lekic at gmail.com
Fri Apr 17 08:08:57 UTC 2026
On Thursday, 16 April 2026 at 23:59:53 UTC, H. S. Teoh wrote:
It becomes _much more_ complicated when you need to check for
version, and depending on version declare functions. D does not
offer good solution for this and that is where C preprocessor
wins as we have to combine `version`s, enums, static ifs in order
to achieve things that are quite simple with C preprocessor.
Those who believe D is good for this should write a binding for a
complex library that supports all versions.
More information about the Digitalmars-d
mailing list