[Zope-dev] Re: TALES idea: tuple unpacking
Dieter Maurer
dieter@handshake.de
Wed, 23 Jul 2003 20:08:43 +0200
Shane Hathaway wrote at 2003-7-23 10:48 -0400:
> ...
> Think of prefixes as site-wide, generally useful Python scripts. Quite
> often some API returns something that's intuitively easy to present, but
> ZPT's syntax makes it somewhat difficult to present. For example, it
> should not be necessary to write a Python script or expression every
> time you want to format the number 5 as "$5.00".
I use TALES since its beginnings and I never needed a monetary format.
We will end up with TALES as a huge monster.
I am sure, both of us (and many others) will be able to cope with this monster
and take advantage of its many features as we did, for example, with
the myriads of attributes for "dtml-var" and "dtml-in".
However, many others will be overwhelmed by the vast set of options.
Be very reluctant to extend TALES. Do not do it do get just
syntactic sugar in order to save a few lines of code.
I am with you for your "macro argument" proposal as it makes
METAL much easier to understand and more explicite.
I would like to get some documentation facility to be able to
document macros, again to make them clearer and easier to maintain.
And I would like some way for a macro to refer to its template
in order to build macro libraries (I think, we need this).
But the prefix proposal seems to me like syntactic sugaring.
I would use it when it were implemented but I do not really need it.
Dieter