Stas Bekman <[EMAIL PROTECTED]> writes:

> Andy Wardley wrote:
> 
> > On Thu, Nov 22, 2001 at 08:08:19PM +0100, Frank Herrmann wrote:
> >
> >>[% var = ['first','next'];
> >>   text = "The Text";
> >>   .... progging ...
> >>   text = "${text} is ${var.0} and then ${var.1}!";
> >>   # ...   ^^^^^^ this is very ugly ;-)

I Don't think that's ugly.

> [% text.concat("The text is ", var.0, " and then ", var.1) %]

In the above case, you have

                  ", var.0, "

With interpolation you will have

                  ${ var.0 }


The interpolation variant will have one less character.  and I think
it's�more readable.


Put code in text or text in code.  Is'nt it so that you will be able
to use more perl-like expressions in more places in TT v3?  Maby
support things like
  [% myfunc("This text has an ${ embedded("function") }") | cool %] ?


-- 
/ Jonas  -  http://jonas.liljegren.org/myself/en/index.html


Reply via email to