On 9/15/06, Axel Liljencrantz <[EMAIL PROTECTED]> wrote: > On 9/15/06, Beni Cherniavsky <[EMAIL PROTECTED]> wrote: > > On 15/09/06, Axel Liljencrantz <[EMAIL PROTECTED]> wrote: > > > On 9/14/06, Beni Cherniavsky <[EMAIL PROTECTED]> wrote: > > > > But things like ``end (echo no)`` are useless, because the right > > > > answer is always known and you only wish to state it clearly. If you > > > > disallow expansions in end's argument, it could be checked as part of > > > > the syntax checks before the command is ever run, which I think would > > > > be much more intuitive. > > > > > > You could do that, but there is honestly no reason to _ever_ write > > > 'end (echo no)', so I don't see why you should change the language > > > syntax to make it larger and less consistent just to disallow it.
Then you should have different commands, ``end'', ``endif'', ``endfor'', etc. Allowing arbitrary expansions in the end command is, I think, allowing the user too much room for error. [...] > You don't need to forbid expansion to get ahead-of-time syntax > checking. That is already what happens. If you don't use any > expantions, the syntax error _will_ be checked at parse time. If you [...] Then I think expansions to arguments of the ``end'' command should be forbidden in order to: (1) ensure that the block is syntax-checked and so help people write correct code (2) encourage readability of code The danger is that people may try to use expansion in an ``end'' command, thinking that it's cool or necessary. But in fact it is dangerous (not checked) and not legible. So expansions should be disallowed, similar to the way ``goto'' does not exist in most languages. Fish should protect the user from making mistakes when possible. And I think the same is true of expansions for the ``for'' command. ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Fish-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/fish-users
