version and debug statements
Walter Bright
newshound at digitalmars.com
Thu May 11 16:07:13 PDT 2006
Ameer Armaly wrote:
> One situation I can see where this kind of functionality could be useful is
> where you want the default compiled behavior to execute a given block of
> code, but with a given version switch you want it taken out. Rather than
> wrapping your prefered behavior in a version block, or putting in an empty
> version block which raises all sorts of questions, you could just say
> "Unless a given version specifier is defined, do this."
I understand that point of view, but I suggest instead thinking about
the "default compiled behavior" as a "Feature", rather than a not
"NotFeature". You can make it the default by putting:
version = Feature;
at the top of the module.
More information about the Digitalmars-d
mailing list