[ZPT] Re: TAL's lack of an else...

Jean-Michel Hiver jhiver at mkdoc.com
Fri Aug 1 13:42:17 EDT 2003


> How about something more traditional but hopefully as powerful in most 
> situations.
> 
> <tal:x tal:condition-group>
>   <tal:x tal:condition="user/isLoggedIn">
>     welcome
>   </tal:x>
>   <tal:x tal:condition="default">
>     please login
>   </tal:x>
> </tal:x>

I don't know what the others think, but I think this is looking like an
ugly mess.

I like TAL because it's got very few instructions with which you can do
a lot. If the syntax starts to have condition-group, repeat-define and
others, then it'll quickly become some horrible attribute-soup.

TAL is actually different enough to be hard to grasp at first (I _still_
haven't got my head around METAL :)). Let's not make it harder to get
started with for newcomers.

I suppose a rule of thumb should be that a new statement / set of
statements should be added to the TAL specification if and only if:

* it deprecates an equal or greater set of statements
* it is equally or more expressive than the previous set
* you don't need to be a nobel prize to understand it

- OR -

* it provides completely orthogonal functionality (i.e. on-error and
condition are orthogonal. else, in comparison, is really just another
kind of condition.


Just my 2p
-- 
Building a better web - http://www.mkdoc.com/
---------------------------------------------
Jean-Michel Hiver
jhiver at mkdoc.com  - +44 (0)114 255 8097
Homepage: http://www.webmatrix.net/



More information about the ZPT mailing list