> At 01:39 AM 8/13/01, you wrote:
>
> >So, Geir, I guess what I'm requesting here is the ability to have
Velocity
> >be a bit more smart about the method lookup. For example, if something
> >returns an int don't just stop with matching that up to a method with an
> >Integer. It should also look for a method with a String as well.
>
> That seems like a bad idea to me. It is likely to introduce programming
> errors if Velocity does this fuzzy method matching. Java won't do that for
> you and Velocity shouldn't either.
I agree. This idea seems quite non-intuitive to me. There should be a
one-to-one correspondence between velocity method calls and the underlying
Java methods. Otherwise, you'll surprise a lot of programmers (albeit some
might be pleasantly surprised).
If you really need that flexibility, have all your methods take Object as
their parameter and do the introspection in your own code to find the method
you want.