Why version() ?

Jarrett Billingsley jarrett.billingsley at gmail.com
Wed Feb 11 13:02:51 PST 2009


On Wed, Feb 11, 2009 at 2:57 PM, Walter Bright
<newshound1 at digitalmars.com> wrote:
> Jarrett Billingsley wrote:
> So I suggest:
>
> version (SomeFeature)
> {
>    codeForFeature();
> }
>
> is clearer, even if SomeFeature is the default.

It might be clearer in the code, but it's far less intuitive for the
library user!

And if SomeFeature is _not_ defined by default, it's not a very good
default, is it!



More information about the Digitalmars-d mailing list