[Zope-dev] Re: simpler TALES. (was Re: TALES idea: tuple unpacking)

Shane Hathaway shane@zope.com
Wed, 30 Jul 2003 16:49:19 -0400


Paul Winkler wrote:
> On Wed, Jul 30, 2003 at 02:29:45PM -0400, Shane Hathaway wrote:
> 
>>>How would you pass arguments in your version?  I'd say that passing
>>>arguments accounts for a very large percentage of my need to use
>>>TALES python expressions.
>>
>>If you need to pass arguments, use a Python expression.  Python 
>>expressions are not on trial.
> 
> 
> You said in another post:
> """
> My feeling is that you should avoid mixing syntaxes in a single
> document.
> """
> 
> So I'm getting mixed messages from you. :-)

They are consistent because neither is absolute.

I'm tired of this.  Do you have a better alternative to subpath 
prefixes?  The constraints are tight:

- You have to make calling explicit.  It's important for Zope 3.

- You don't get the implicit acquisition crutch anymore.  It's important 
for Zope 3.

- You have to provide an easy way to access APIs.  It's important for 
Zope 3.

- You have to provide a way to explicitly acquire.  It's important for 
Zope 3!

- You can't use Python statements in templates.

- Everyone is going to argue over your solution for months.

I've tried very hard to invent a way to solve the problems with path 
expressions without changing TALES.  I can't.  So I gave myself the 
flexibility of using just one character that was reserved anyway in path 
expressions, and the solution fell out.

If you want to look for a solution, consider using *only* Python 
expressions--no path expressions.  You'll get a lot of mileage that way, 
but at the expense of syntax clashes.  Who knows, you might find a 
pretty good solution.

Shane