Re: [SMARTY-DEV] Handling TRUE,FALSE,NULL,ON,OFF, etc
| From: | Andrei Zmievski | Date: | Fri, 09 Apr 2004 18:18:17 +0000 |
| Subject: | Re: [SMARTY-DEV] Handling TRUE,FALSE,NULL,ON,OFF, etc | ||
| References: | 1 2 3 4 5 | Groups: | php.smarty.dev |
| Request: | Send a blank email to php-smarty-dev+get-2271@lists.php.net to get a copy of this message | ||
On Thu, 08 Apr 2004, Mark Rogers wrote:
> My point (which you snipped) is that where we don't accept |DEFAULT we *do*
> accept TRUE/FALSE etc, then interpret them non-intuitively.
The fact that we accept invalid tokens is a bug, not a feature.
> To accept (without error) TRUE and interpret it differently from true is
> counter-intuitive.
Of course.
> I am sure that you would not advocate dropping support for TRUE from
> PHP and treating it as string "TRUE".
Of course not.
> Personally, while I think case sensitivity is a Good Thing in a programming
> language (eg PHP) I'm not sure it is relevant in a templating language
> (Smarty) - but would not argue against it. But surely we should either error
> on TRUE/FALSE/null if they are wrong, or interpret them intuitively
> otherwise. I cannot see an argument for interpreting them as they are
> currently interpretted.
It should be fixed to not accept invalid (differently cased tokens).
- Andrei