Nathan Bubna wrote : > it would also be nice for maintaining some semblance of backward > compatibility. there was integer division before; there's no good reason to > stop having one now. also, it's an easier change to just switch from: > > #set( $foo = 5 / 2 ) to #set( $foo = 5 // 2 ) than to bother w/ intValue() >
Another proposal to consider, that goes in the sense of backward compatibility (fully bc in fact) : Only use '/', and make an integer division when implied numbers are both integers, floating point division otherwise. Afterwards, intValue() and floatValue() can be used in some special cases : when you need a float result from two integers, or when you need an integer result from two floats. But the default behaviour covers a wide percentage of standard cases. One good point (but not a real argument, I know) is that java developers won't be surprised. Yes I know, it is not very convenient to code this with the current implementation of the patch, since (if I understood well) all numbers are converted to BigIntegers beforehand. But it is not a real argument either :-) CloD --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
