on 5/13/02 3:11 PM, Chris Withers at chrisw@nipltd.com scrivened:
For the reasons 'else' was invented in the first place,
'else' in what context?!
Meaning, in procedural languages.
I guess: prone to errors, inefficient, bulky.
Can you give any material that actually backs up these sweeping claims? ;-)
Prone to errors: when changing the condition, have to duplicated edits in 2 places, so you could make an error which would be hard to track down. Inefficient: have to evaluate an expression twice (unless someone makes a jit compiler!) Bulky: in terms of taking more space in the source file, without clarifying what's being done.
The biggest thing I see is: isn't linked to the other construct, so it's prone to errors when editing the conditions.
Well, I've already shown the way I'd do this which only has the condition in one place....
Yes you did, and re-reading the TAL wiki (http://www.zope.org//Wikis/DevSite/Projects/ZPT/TAL%20Specification%201.2) it's clear that your approach is the one the language is designed for. Also, your approach can easily accommodate other logic structures like case statement. Well, I guess I'm convinced!