On 1 Oct 2010, at 18:46, Moritz Baumann wrote:

>> I think the next step would be to work out syntax exactly:
>> 
>> http://phptal.org/wiki/doku.php/improvedtales 
> 
> Hm, that page mentions a lot more than just logical operators. I guess that’s
> what the negative feedback was about, not logical operators inside 
> tal:condition.
> 
> The main difference between PHPTAl and other template engines is that the 
> syntax
> is quite simple and that the templates look "clean". IMHO, function calls and 
> an
> equivalent to the ?: operator would add unnecessary complexity to PHPTAL and
> spoil exactly what makes PHPTAL unique and great. Support for logical 
> operators
> inside tal:condition, on the other hand, would make the php: modifier more or
> less unnecessary.


I look at this differently: these are things I need, whether their syntax is 
nice or not, so I'd prefer to make their syntax nicer.

Perhaps arguments to functions is a step too far (and authors should be 
required to write expression modifiers for these), but setting of class name 
based on condition is a very common pattern and ternary operator is an awful 
way to do it.

-- 
regards, Kornel


_______________________________________________
PHPTAL mailing list
PHPTAL@lists.motion-twin.com
http://lists.motion-twin.com/mailman/listinfo/phptal

Reply via email to