velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Revusky <revu...@wanadoo.es>
Subject Re: comparing monetary value
Date Wed, 16 Oct 2002 22:39:04 GMT
On Wednesday 16 October 2002 09:19 pm, Tim Colson wrote:
> Hey gang -
>
> Jonathan accused:
> > You do seem to be deliberately missing the point.
>
> At least I'm not deliberately beating a dead horse. <grin>
> Anyway, I'll skip the baiting comments and focus on these two:
>
> Jonathon posed:
> > Velocity simply does not provide a solution for the localized
> > (or even non-localized) display of decimal numbers.
> > Whether it should do so is open to debate,
> > but it mostly clearly does not address the issue.
>
> Ok - I'll agree to both of those, keeping in mind that while Velocity
> does not provide this OOTB (Out of the Box), it can indeed be
> accomplished by writing a simple drop-in tool.

Well, how simple is it? Actually, in another part of this thread, people are 
emphasizing how difficult it is to deal with floating point correctly 
(rounding and display issues) as an explanation for why it is not supported. 
So there's a real contradiction here.

It certainly seems that it is complex enough that it is highly desirable for a 
template engine to address this kind of thing in a standard way. Besides, 
even abstracting away whatever tricky implementation issues there are, it's 
just plain annoying to have to write something like:

$myCustomTool.multiply($x, $y)

when this could be written:

${x*y}

>
> Personally, I'm happy with current functionality because I mostly push
> all comparisons into the controller. Heck, I currently think any
> comparisons except for "truth" is a slippery slope. Go ahead and call me
> a Luddite, but I prefer simple, and I might even propose the removal of
> Integer comparisons. Hah! ;-)

Oh, go ahead. I'd love that. :-)

>
> So, by my count, the current talley of folks who want Velocity to handle
> non-integer arithmetic operations out of the box:
> +1 Jonathan

Oh no, not me. I would just as soon have Velocity continue without support for 
decimal numbers. 

> +1 Daniel
> +1 Christoph

Well, c'mon. I'm sure there are lots more people than that who want Velocity 
to support decimal numbers. A lot of people wouldn't pipe up and say it 
because:

(a) They don't want to be on the receiving end of any browbeating 

and/or 

(b) They're not in the mood to be treated to the "model-view separation" song 
and dance one more time.

Also, a lot of people have surely tried to use Velocity and subsequently 
switched to something else because they got tired of these kinds of  
limitations. And, almost certainly, the lack of full numerical support was 
top of the list. Of course, one will not hear from those people because 
they're not around any more. (In statistical inference, IIRC, this phenomenon 
is called "self-selection bias".)

> -1 Tim
>
> Note: seems fair to disclose that Jonathan, to paraphrase the FreeMarker
> website, "rewrote the core of FreeMarker". 

Tim, when you say it "seems fair to disclose..." somebody could infer that I 
have been trying to hide this. As a matter of fact, anybody would very 
quickly hit upon the above information by following the link in my sig. I 
have been quite up-front about disclosing this.

> Also, I noticed that Daniel
> is heavily active on the FM-DEV list. 

That is quite true. But I don't know what you should conclude from that. I 
have noticed that various individuals are subscribed to this list as well as 
Freemarker-devel. Probably some of them are also subscribed to the webmacro 
list as well. Probably they just want to keep up with what is going on in 
this space.

Anyway, I referred in a separate message to the "beg the question" fallacy. I 
get the feeling now that that you are drifting more towards the "ad hominem 
fallacy". That's where, rather than addressing the argument and facts a 
person is presenting, you attack the person himself, or impugn his motives... 
-- of course, typically the ad hominem fallacy is resorted to because of an 
inability to refute the other guy's argument.

> It puzzles me, but I will not
> speculate on why these gents are so worked up about having this feature
> in Velocity, since by Jonathan's own explanation, it already exists in
> the Freemarker template engine which both chaps seem to prefer.

Well, as I said, I would just as soon that the Velocity people never implement 
decimal arithmetic.

Look, I don't have a hidden agenda particularly. I've put a lot of work into 
making FreeMarker a superior templating solution and I want people to be 
aware of it. Now, what is going on here is that I'm sure that a lot of people 
try Velocity (after all, it has a really high profile being part of 
apache.org) and then after a while, many of these people stop using it 
because they run into the tool's limitations and also this "pure MVC" 
"rigorous separation" "elegant minimalism" song and dance.

The normal thing for these people to do is probably to revert to using JSP, 
since that is the other presentation solution in this space they will know 
about.

My agenda? Well, I want people in that spot to know about FreeMarker as well. 
It's simple. If the Velocity developers consciously choose not to support 
decimal arithmetic, I don' t see what the issue is in telling people about 
FreeMarker -- which does support decimal arithmetic, and has a culture which 
makes it far more likely that we will add features that people need to get 
their work done.

If certain people want hamburgers and you have chosen not to serve hamburgers 
in your restaurant, because you believe hamburgers are a bad thing (and maybe 
you're right, but it's irrelevant because the customer still wants his 
burger) I don't see what the issue is in terms of telling somebody that 
there's a Burger King round the corner where they can get what they want.

Anyway, it's all consummately fair. People can compare the various tools and 
make their own decision.

Regards,

Jonathan Revusky
--
FreeMarker-Velocity comparison doc
http://freemarker.sourceforge.net/fmVsVel.html
Velocity->FreeMarker template conversion utility
http://freemarker.sourceforge.net/usCavalry.html


--
To unsubscribe, e-mail:   <mailto:velocity-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:velocity-user-help@jakarta.apache.org>


Mime
View raw message