D - Versioning
- "Vathix" <vathix dprogramming.com> Aug 28 2003
- "Matthew Wilson" <matthew stlsoft.org> Aug 29 2003
- "Vathix" <vathix dprogramming.com> Aug 29 2003
- "Matthew Wilson" <matthew stlsoft.org> Aug 29 2003
- "Walter" <walter digitalmars.com> Sep 05 2003
- "Sean L. Palmer" <palmer.sean verizon.net> Sep 06 2003
- "Vathix" <vathix dprogramming.com> Sep 06 2003
- "Walter" <walter digitalmars.com> Sep 09 2003
- "Vathix" <vathix dprogramming.com> Sep 10 2003
If I do this
version(!SOMEVERSION) { foo(); }
the compiler has error: identifier or integer expected, not !
shouldn't we be able to do that instead of:
version(SOMEVERSION) {} else { foo(); }
Same thing with debug.
Aug 28 2003
Yes. Am surprised we cannot.
We should also be allowed to write
version (Onething, Another, AndMore)
{
}
else version (Different, Weirder)
{
}
else
{
}
Though I do not know whether we can or can't. Enlightenment needed ... :-)
"Vathix" <vathix dprogramming.com> wrote in message
news:biknge$em4$1 digitaldaemon.com...
If I do this
version(!SOMEVERSION) { foo(); }
the compiler has error: identifier or integer expected, not !
shouldn't we be able to do that instead of:
version(SOMEVERSION) {} else { foo(); }
Same thing with debug.
Aug 29 2003
Interesting, although I think it might be better using && and || operators. "Matthew Wilson" <matthew stlsoft.org> wrote in message news:bink34$1sqv$1 digitaldaemon.com...Yes. Am surprised we cannot. We should also be allowed to write version (Onething, Another, AndMore) { } else version (Different, Weirder) { } else { } Though I do not know whether we can or can't. Enlightenment needed ... :-) "Vathix" <vathix dprogramming.com> wrote in message news:biknge$em4$1 digitaldaemon.com...If I do this version(!SOMEVERSION) { foo(); } the compiler has error: identifier or integer expected, not ! shouldn't we be able to do that instead of: version(SOMEVERSION) {} else { foo(); } Same thing with debug.
Aug 29 2003
"Vathix" <vathix dprogramming.com> wrote in message news:binkfk$1t7m$1 digitaldaemon.com...Interesting, although I think it might be better using && and ||
Fair point"Matthew Wilson" <matthew stlsoft.org> wrote in message news:bink34$1sqv$1 digitaldaemon.com...Yes. Am surprised we cannot. We should also be allowed to write version (Onething, Another, AndMore) { } else version (Different, Weirder) { } else { } Though I do not know whether we can or can't. Enlightenment needed ...
"Vathix" <vathix dprogramming.com> wrote in message news:biknge$em4$1 digitaldaemon.com...If I do this version(!SOMEVERSION) { foo(); } the compiler has error: identifier or integer expected, not ! shouldn't we be able to do that instead of: version(SOMEVERSION) {} else { foo(); } Same thing with debug.
Aug 29 2003
"Vathix" <vathix dprogramming.com> wrote in message news:biknge$em4$1 digitaldaemon.com...If I do this version(!SOMEVERSION) { foo(); } the compiler has error: identifier or integer expected, not ! shouldn't we be able to do that instead of: version(SOMEVERSION) {} else { foo(); } Same thing with debug.
It's a good question. What I was trying to do was avoid the C #ifdef mess, where it's nearly always the case that the layers of #if A && B && !C || D make little sense as separate versions, as it was built by layering of incomplete ideas. The idea is to decide exactly what of several versions are to be built, and build that one, not a mix of incomplete versions.
Sep 05 2003
You can't save people from themselves. ;) Sean "Walter" <walter digitalmars.com> wrote in message news:bjb69g$2pks$1 digitaldaemon.com..."Vathix" <vathix dprogramming.com> wrote in message news:biknge$em4$1 digitaldaemon.com...If I do this version(!SOMEVERSION) { foo(); } the compiler has error: identifier or integer expected, not ! shouldn't we be able to do that instead of: version(SOMEVERSION) {} else { foo(); } Same thing with debug.
It's a good question. What I was trying to do was avoid the C #ifdef mess, where it's nearly always the case that the layers of #if A && B && !C || D make little sense as separate versions, as it was built by layering of incomplete ideas. The idea is to decide exactly what of several versions
to be built, and build that one, not a mix of incomplete versions.
Sep 06 2003
How about allowing debug by itself without parentheses so the code will be included if any type of debug is on, like assert. debug foo(); It looks like debug(0) does the trick but I don't think it's a standard.
Sep 06 2003
"Vathix" <vathix dprogramming.com> wrote in message news:bjdc8h$2ush$1 digitaldaemon.com...How about allowing debug by itself without parentheses so the code will be included if any type of debug is on, like assert. debug foo(); It looks like debug(0) does the trick but I don't think it's a standard.
The trouble is the ambiguity in the grammar to support both debug (0) expression and debug (expression).
Sep 09 2003
"Walter" <walter digitalmars.com> wrote in message news:bjmflf$1184$2 digitaldaemon.com..."Vathix" <vathix dprogramming.com> wrote in message news:bjdc8h$2ush$1 digitaldaemon.com...How about allowing debug by itself without parentheses so the code will
included if any type of debug is on, like assert. debug foo(); It looks like debug(0) does the trick but I don't think it's a standard.
The trouble is the ambiguity in the grammar to support both debug (0) expression and debug (expression).
That's true, sorry. I'm fine with using debug(0)
Sep 10 2003









"Matthew Wilson" <matthew stlsoft.org> 