I fully understand your point. Personally I always wondered why people are using the "%"-key on their calculators ;) Where is the point to stop at? You have arguments for including the %-stuff. Others working in another business may argue that the binary or octal representation of literals should be included. You can add points to this list as you wish - there are plenty of them. What I am trying to say is that I see velocity as a basic template-engine that gives you a foundation to build you view-layer upon. Honestly I am a -0 on you proposal. I don't like the idea but it is no big PITA for me if it is in there. But I am *definitely* -1 on including it now. I'd like to get a full "floating point" proposal together first and then think of other stuff to be included.
But since I am not a committer my -0s and -1s don't count anyway. If you insist on the %-sign then it would be best if you propose it in a different patch.
Regards, Peter
..: I will now take a look at your literal stuff and then add the DIV-operator and the Comparable-stuff. I hope to get it done early this week (the weekend has been too busy).
Will Glass-Husain wrote:
Hi,
Thanks for the comments. But I'm going to push back on this a little.
It's not featuritis. It's a simple change to the (currently non-committed) floating point literal format. It will add 3 characters to the regular expression and 1 line to the floating point node. I'd be happy to support this minor language syntax as I will support the floating point literal syntax in general.
I'm surmising that your apps (and possibly dev experience) are not extensively numerically based. But for those Velocity apps which are numerically oriented (such as my simulation tools), this fits in very well with the behavior users expect. The modelers put a value "Market Share" in the context with a value of 60% (meaning 0.60), thus it's a natural thing for the web designers to say #if($Value.MarketShare > 50%). It's self-documenting and is consistent with typical numerical use.
Admittedly this is a minor feature. No need for a long discussion (or religious war -- we've had enough). But before I give up on this, I'd like to ask for a better explanation than "I don't like it" and "users should do it some other way". :-)
Best, WILL
----- Original Message ----- From: "Peter Romianowski" <[EMAIL PROTECTED]>
To: "Velocity Developers List" <[EMAIL PROTECTED]>
Sent: Saturday, June 28, 2003 4:11 PM
Subject: Re: Velocity Numerics: Floating Point Literals
Will Glass-Husain wrote:
Hi,
I put all the number patches together and installed it on our dev server
so
my colleagues could try out the new system. They were excited.
Good! ;)
One comment I got back was that percentages should work: #if($Value.Result == 75%)
No way! ;) Seriously, I don't like the idea and I am *strongly* against
it.
You should better teach the people to write 0.75 ;) I don't think much
people
expect this to work. As Nathan already said: Let's not start a featuritis.
Although not standard Java syntax, many numerical programs (such as
Excel,
our own simulation language, and even a hand calculator) accept a
percentage
as part of a number. Anyone mind if I add this to the floating point literal spec?
Yes, me ;)
Regards,
Peter
--------------------------------------------------------------------- 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]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
