Sane API design (AKA C's #ifdef hell)

Dennis dkorpel at gmail.com
Fri Apr 17 14:33:42 UTC 2026


On Friday, 17 April 2026 at 13:51:58 UTC, Adam D. Ruppe wrote:
> tbh though instead of versioning symbols i'd rather they be 
> like marked... better to say "function foo was introduced in 
> version 4.4 but you are using 4.3 compatibility flags" rather 
> than "undefined symbol: foo"

Perhaps adding a bool and string argument to the `@disabled(b, 
"needs version 4.3")` attribute?


More information about the Digitalmars-d mailing list