Jose Alberto Fernandez wrote:

> 
> Maybe the real issue here is that we need some more intelligent casting
> rules. Like we have in those others interpreted languages. I do not think
> just assuming Integer is the right choice. Assume you are comparing a Float
> and a Double, for example.
> 
> One would need to have a real casting matrix for Numeric types:
> 
>                    Byte    Short    Integer  Long   Float  Double
>         Byte        -      Short    Integer  Long   Float  Double
>         Short      Short     -      Integer  Long   Float  Double
>         Integer    Intefer Integer     -     Long   Float  Double
>         Long       Long    Long     Long      -     Float  Double
>         Float      Float   Float    Float    Float    -    Double
>         Double     Double  Double   Double  Double  Double   -
> 
> Or something like that. The casting rules should apply not only to
> comparisons but also to parameter passing, that would solve the particular
> case here in a much more general way.
> 
> Of course, there is all the issues about ambiguous signatures, but hey they
> are plenty of languages that have defined rules to dealt with this and we
> could just borrow from there.
> 

I think we have to be very, very careful here.  If we change, it should
be dumb-simple and fast.  If we don't have to document it (meaning its
simple and straightforward) that would be best.  Running out of time
this morning.  Will stew and have a more intelligent reply later.

geir

-- 
Geir Magnusson Jr.                           [EMAIL PROTECTED]
System and Software Consulting
Developing for the web?  See http://jakarta.apache.org/velocity/
You have a genius for suggesting things I've come a cropper with!

Reply via email to