minwin
Bill Baxter
wbaxter at gmail.com
Tue Nov 28 11:40:34 PST 2006
Walter Bright wrote:
> Anders F Björklund wrote:
>
>>> (is there a way to do version(!NOMAIN)?)
>
>
> "Not no-how, not no-way!" -- the Cowardly Lion
>
> > A patch to do so has been rejected several times,
> > it's apparently "against the spirit" of version...
> > (it is supposed to be "positive" and not negative,
> > see Walter's earlier newsgroup posts* on the topic)
>
> "Sir, you are employing a double negative." -- Mr. Spock
Yeh, ok, "not no main" is not a great example.
And actually I think if such a think existed the 'not' should be on the
'version' instead of the identifier,
more like #ifndef VAR than #if !VAR
!version(LeanAndMean) {
// do some fatty stuff here
}
The bottom line is, just because D doesn't have negative version checks,
doesn't mean the need for them will go away. It just means that
"version(X){}else"
becomes the spelling of "!version". I'd personally rather see
!version(X) or not_version(X) than version(X){}else.
But either way it's not a big deal. Just an odd thing to get all
principled over.
--bb
More information about the Digitalmars-d-announce
mailing list