Re: Handling TRUE,FALSE,NULL,ON,OFF, etc
boots <[email protected]>
| Newsgroups | gmane.comp.php.smarty.devel |
|---|---|
| Message-ID | <[email protected]> |
--- Andrei Zmievski <[email protected]> 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/ -- Smarty Development Mailing List (http://smarty.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php