You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by Bill Chmura <Bi...@Explosivo.com> on 2003/07/03 22:06:19 UTC
RE: Velocity Numerics [PATCH] -> See Jonathan, the love is spreading
See what is beginning? This is fantastic
-----Original Message-----
From: Will Glass-Husain [mailto:wglass@forio.com]
Sent: Thursday, July 03, 2003 1:13 PM
To: Velocity Developers List
Subject: Re: Velocity Numerics [PATCH]
Hi Jonathan,
Just wanted (in all sincerity) to thank you for your comment on the
numeric patch earlier. A brief constructive suggestion is very helpful,
and (although I've disagreed on a few of your points) it's clear you've
got some excellent insight into template engine design. There was some
very good discussion on this patch with advice and opinions from 4 or 5
members of this list. I'm sure the floating point number capability
will be a nice feature addition to Velocity.
WILL
----- Original Message -----
From: "Jonathan Revusky" <jo...@revusky.com>
To: <ve...@jakarta.apache.org>
Sent: Thursday, July 03, 2003 9:45 AM
Subject: Re: Velocity Numerics [PATCH]
> Will Glass-Husain wrote:
> > I'm not sure I see a downside to including this (ability to compare
numbers
> > and Strings). Template designers are not programmers. When they
> > hit problems (particularly those involving types), it'd be nice if
> > most
things
> > just worked.
> >
> > I can see a few counter points. It won't work well for formatted
numbers
> > (and only for internationalized numbers in the current locale). And
it's
> > not a common use case (as a few have pointed out) to compare 4.0 >
"4.0".
> > If we include my TemplateNumber proposal, then the developer can
> > always
wrap
> > a String with an adapter that implements TemplateNumber so that it
> > is properly comparable. Thus, (personally), I don't need this
> > feature that badly.
> >
> > But as I say above, I don't see a big downside to including it.
> > Some
might
> > say... If you don't want it, don't use it.
> >
> > Let's not get in a big flame war here. We've heard from Jonathan
> > and
John.
>
> I wouldn't think that my vote counts, of course. I'm not really part
> of this community. I'm lead developer of a competing template engine.
>
> That said, if you respect my opinion, and you want to know what
> semantics I would propose in a given situation, you hardly even need
> to ask me or wait for me to chime in. You can just look at how the
> template engine that cannot be named does it and that will give you an
> idea of what I think the right way of going about things is...
>
> Regards,
>
> Jonathan Revusky
> --
> lead developer, FreeMarker project, http://freemarker.org/
> FreeMarker-Velocity comparison page,
> http://freemarker.org/fmVsVel.html
>
>
> > Any comments from others?
> >
> > Best,
> > WILL
> >
> >
> >
> > ----- Original Message -----
> > From: "John J. Allison" <jo...@joss.ucar.edu>
> > To: <ve...@jakarta.apache.org>
> > Sent: Wednesday, June 25, 2003 3:54 PM
> > Subject: Re: Velocity Numerics [PATCH]
> >
> >
> >
> >>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
> >>john@joss.ucar.edu
> >>
> >>--------------------------------------------------------------------
> >>-
> >>To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
> >>For additional commands, e-mail:
velocity-dev-help@jakarta.apache.org
> >>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-dev-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-dev-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-dev-help@jakarta.apache.org