+1 for option #1 Cort
-----Original Message----- From: Will Glass-Husain [mailto:[EMAIL PROTECTED] Sent: Sunday, January 04, 2004 12:27 PM To: Velocity Developers List Subject: integer division issue Hi, I was flipping through the recent discussion now and this past summer (June to July) on the integer division issue. I think the issue is fairly clear cut, a decision just needs to be made, Here's a summary of the options. Does this seem fair? ------------ (1) Make the / operator mean a floating point division, and add a integer division operator (perhaps \ or //) 5 / 2 => 2.5 5 / 2.5 => 2.0 5 // 2 => 2 PROS: * most intuitive to non programmers (who may not understand the subtle difference between 2 and 2.0) CONS: * breaks backwards compatibility (anyone have a sense of how frequently this is used?). ------------ (2) Have the / operator do integer division with integer arguments, and f.p. Division otherwise. 5 / 2 => 2 5 / 2.0 => 2.5 5 / 2.5 => 2.0 PROS * backwards compatible CONS * may not be apparent what the type is for a reference (e.g. 5 / $value) * goes against the major rationale of this patch, which is that the typical template designer is not a programmer and makes no distinction between 2 and 2.0 ------------ (3) Have the behavior of "/" be dependent on a system property PROS * Developer decides CONS * Generally poor design to make syntax dependent on configuration Are there other options? My impression was that after extensive discussion this summer, there was a pretty good consensus on option #1 (e.g. the benefit was worth breaking b.c.) Of course, consensus can and does change over time. How shall we proceed? WILL --------------------------------------------------------------------- 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]
