Re: [SMARTY-DEV] Handling TRUE,FALSE,NULL,ON,OFF, etc

From: Date: Fri, 09 Apr 2004 21:05:17 +0000
Subject: Re: [SMARTY-DEV] Handling TRUE,FALSE,NULL,ON,OFF, etc
References: 1  Groups: php.smarty.dev 
Request: Send a blank email to php-smarty-dev+get-2277@lists.php.net to get a copy of this message
--- Andrei Zmievski <andrei@gravitonic.com> wrote: > On Fri, 09 Apr 2004, messju mohr wrote: > > hmm. to me this was always intuitive: > > - "true", "false", "on", "off" and > > "null" are case-sensitive and > special. > > - all other \w+ are treated as strings. > > > > please don't break stuff like {assign var=foo value="v"} or > > {$var|escape:javascript} by treating invalid (=unknown) tokens as > > syntax-errors. > > Hmm, what's unknown in {assign var=foo value="v"}? Now, if you did > {assign var=TRUE value="v"}, I see a probem there, because it would > look > like you are assigning a boolean value to 'var'. Hmm. It only looks like that if you read 'TRUE' as 'true', which ought be documented as not-the-case. I see this as a style issue. If developers use quotes for literals, the ambiguity is removed. I suggest that if someone elects to use the easier/lazier syntax (quoteless), they ought to be made aware of the consequences. I think that protecting against it is superfluous. I think that messju might have been suggesting that "fixing" true/TRUE would imply that foo/FOO would unnecessarily get "fixed" as a consequence. Or at least, we wouldn't want that side-effect :) xo boots __________________________________ Do you Yahoo!? Yahoo! Small Business $15K Web Design Giveaway http://promotions.yahoo.com/design_giveaway/

« previous php.smarty.dev (#2277) next »