[Zope] Syntax: Learning from JSP's problems

Robb Shecter shecter@darmstadt.gmd.de
Fri, 11 Feb 2000 20:47:45 +0100


Just brainstorming here... feel free to slam on this... :)

Tres Seaver wrote:

> We could perhaps hack the var tag to pass along any non-standard attributes as
> keyword arguments:
>
>   <dtml-var myMethod foo="bar"> # inject foo="bar" into myMethod's namespace
>

What about:

<dtml-var myMethod(foo="bar")>

Advantages:
+ Uses already well-known python syntax.  Programmers don't have to learn another.
It's meaning is readily apparent.
+ Makes it visually clear that foo "belongs to" myMethod and not dtml-var.
+ Removes the need to specially escape dtml-var names.

Disadvantages:
- Deviates from the current xml-like syntax.  But then again, so does the token
"myMethod" hanging out in the middle of a tag.

- Robb