[ZPT] Mini proposal: repeat-define and repeat-condition

Jeffrey P Shell jeffrey@cuemedia.com
Sun, 26 Jan 2003 11:32:42 -0700


I'm still -1 on this whole proposal.  I haven't seen any extension to 
the syntax that actually improved the readability and understandability 
of TAL - they all make it worse, and favor only those who grumble about 
putting these extra tags around things, which I have no problem with. 
There are no alarms or surprises with the current system - the rules 
are easy to look up and learn.  And the 'rcondition' or 'condition2' 
names start to walk into the land of Perl 4 style clarity.

So any of the proposals that actually involve changing the order, 
whether it's by some dynamic switch or by force, would make forward 
migration a pain.  We already have a lot of trepidation when upgrading 
some of the large sites we've written and continue to maintain in Zope 
to new versions of the app server.  If we actually knew that many or 
all of our page templates could change behavior, there's suddenly much 
less impetus to try the upgrade.  Even if tools existed to detect 
situations that could potentially break, it could end up being a very 
long process going through and figuring out the situations that need 
upgrading.  This is made even worse for sites that we continue to host 
(many on the same Zope instance) but no longer maintain.

In other words - I haven't seen any solution that doesn't outweigh the 
nature of the problem being solved.  Either maintainability is 
sacrificed, or forward compatibility is sacrificed.  And I doubt any of 
my customers will pay me for the time involved to change all the code 
and test all of their sites if we have to upgrade the Zope instance to 
a newer version of the software.

On Sunday, January 26, 2003, at 07:53  AM, Evan Simpson wrote:

> Fernando Martins wrote:
>> All right! I'm missing something!
>
> Here's a more concrete example (tested):
>
> <div tal:define="d python:{'a;;b': (1,2,3)}"
>      tal:condition="exists:d/a;b"
>      tal:repeat="n d/a;b"
>      tal:context="n"></div>
>
> Note that the semicolon in the tal:define is doubled, in order to 
> prevent it being interpreted as a delimiter between definitions.  The 
> tal:condition and tal:repeat, on the other hand, do not have multiple 
> parts, so there is no need, or ability, to escape the semicolons.
>
> Introducing multiple parts to tal:repeat would break this example.
>
> Cheers,
>
> Evan @ 4-am
>
>
> _______________________________________________
> ZPT mailing list
> ZPT@zope.org
> http://lists.zope.org/mailman/listinfo/zpt