D - Versioning
- Vathix (6/6) Aug 28 2003 If I do this
- Matthew Wilson (14/20) Aug 29 2003 Yes. Am surprised we cannot.
- Vathix (3/27) Aug 29 2003 Interesting, although I think it might be better using && and || operato...
- Matthew Wilson (5/38) Aug 29 2003 operators.
- Walter (7/13) Sep 05 2003 It's a good question. What I was trying to do was avoid the C #ifdef mes...
- Sean L. Palmer (5/18) Sep 06 2003 You can't save people from themselves. ;)
- Vathix (4/4) Sep 06 2003 How about allowing debug by itself without parentheses so the code will ...
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 ||operators. 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...areIf 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 versionsto 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...beHow about allowing debug by itself without parentheses so the code willThat's true, sorry. I'm fine with using debug(0)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 10 2003