Why version() ?
Jarrett Billingsley
jarrett.billingsley at gmail.com
Wed Feb 11 13:14:32 PST 2009
On Wed, Feb 11, 2009 at 4:11 PM, Bill Baxter <wbaxter at gmail.com> wrote:
>
> I thought he meant this:
>
> // once at the top
> version(SomeFeatureDisabled) {
> } else { version = SomeFeature; }
>
> // in rest of code ...
> version (SomeFeature)
> {
> codeForFeature();
> }
I don't know whether or not Walter _was_ actually insinuating that but
it's a pretty good idea ;) the only disadvantage of course being that
I have to copy the //once at the top part into every file that wants
to use the SomeFeature version, though that probably
wouldn't/shouldn't be a big issue in practice.
More information about the Digitalmars-d
mailing list