On Thu, Feb 12, 2009 at 6:02 AM, Jarrett Billingsley
<[email protected]> wrote:
> On Wed, Feb 11, 2009 at 2:57 PM, Walter Bright
> <[email protected]> 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!

I thought he meant this:

// once at the top
version(SomeFeatureDisabled) {
} else { version = SomeFeature; }

// in rest of code ...
version (SomeFeature)
{
    codeForFeature();
}

--bb

Reply via email to