Jonathan Revusky wrote: > > I know that perl automatically coerces numbers into strings in these > spots, and I recognize that it "works" as far as that goes. > > However, that does not tend in any way to alter my opinion that it's a > terrible idea.
Yeah, but it works so well in Perl that nobody cares that it's a bad idea (like a lot of stuff in Perl). (I don't follow perl-dev or whatever, maybe it's actually a big issue for them.) And Perl does have different operators for numbers and strings which makes things clearer. Auto-coercing strings to numbers could contribute to Velocity's usability rather than having to use syntax like #set ($foo = 42) $foo.parseInt($bar) It gets quite useful when template writers can't influence the API of the Java objects they're referencing (even via subclassing a wrapper) and are stuck with toString() or equivalent when at least sometimes they know the string represents a number. Of course that still doesn't mean it's a good idea for Velocity, and I don't immediately see where *I* would write code that requires this coercion. :) John Allison [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
