commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Al Chou <>
Subject Re: [math] abstact nonsense was Re: [math][functor] More Design Concerns
Date Thu, 03 Jul 2003 19:44:23 GMT
--- "Craig R. McClanahan" <> wrote:
> My understanding is that this is exactly what you'll get from the
> auto-unboxing capability.  The compiler will be able to see that the right
> hand side returns a Double, and generate the code to unbox it into a
> double primitive for you.
> This is separate from Generics because it also works in other scenarios:
>   Double d1 = new Double(1.0); // A lowly scalar instance of the wrapper
>   double d2 = d1;              // But no cast here either!
>   d1 = d2 + 0.5;               // Or here ... it is bidirectional

IMO, that's even more useful than generics (or limited C++-style templates, if
you prefer to think of them that way).  As a math-using person, I really never
wanted to have to make much of a distinction between a double and a Double
(although I somewhat understand the CS considerations that could make having
the distinction desirable).


Albert Davidson Chou

    Get answers to Mac questions at .

Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message