Thanks Tim, Good point. Here's one that's even more puzzling. > #if ( "42" == "42.0" ) What should this do? #end
if 42 == "42.0" and 42 == "42" but "42" != "42.00" that's pretty strange. WILL ----- Original Message ----- From: "Tim Colson" <[EMAIL PROTECTED]> To: "'Velocity Developers List'" <[EMAIL PROTECTED]> Sent: Thursday, June 26, 2003 11:47 AM Subject: RE: Velocity Numerics [PATCH] > > Will Glass-Husain said: > > > I'm not sure I see a downside to including this (ability to compare > > > numbers and Strings). > > -1 > Hmm... I'm fond of Perl, but string to number comparisons would, imho, > increase ambiguity in comparisons. Examples: > > #if ( 42 == "42" ) Perl says true but what does Velocity decide? #end > #if ( 42 == "42.0" ) Perl says true but what does Velocity decide? #end > #if ( 42 == "4.2e1" ) Perl says true but what does Velocity decide? #end > #if ( 0 == "0" ) Perl says true but what does Velocity decide? #end > #if ( 0 == "foo" ) Perl says true but what does Velocity decide? #end > > I support that numbers including float should Just Work (tm) and want to > be able to type #set ( $foo = 5 / 2.5) but fear the negative effect of > weird/ambiguious comparison rules between numbers and strings. > > -Timo > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
