To allow for different debug versions without having to go full blown version().

@mem debug do something memory wise

@see debug write a message to console

Then these different attributed versions can be disabled. it could be something like

version(debug(see)) = none;

or

static if (hasAttribute(debug, @mem)) disable @mem;

or from the command line or whatever.

What makes this useful is we can easily assign different debug types(could be generalized to other versions(release, etc)) and not have to use version(longer and requires defines of the identifier).



Reply via email to