commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <craig...@apache.org>
Subject Re: [math] abstact nonsense was Re: [math][functor] More Design Concerns
Date Thu, 03 Jul 2003 16:40:00 GMT


On Thu, 3 Jul 2003 brent@worden.org wrote:

> Date: Thu, 03 Jul 2003 08:21:22 -0700 (PDT)
> From: brent@worden.org
> Reply-To: Jakarta Commons Developers List <commons-dev@jakarta.apache.org>
> To: commons-dev@jakarta.apache.org
> Subject: Re: [math] abstact nonsense was Re: [math][functor] More Design
>     Concerns
>
> > > 3)
> > >
> > > BTW, probably does the future introduction of Generics (Java 1.5)
> > > promise any opportunities to work with primitive values and yet
> > > have no code duplication (a bit like STL)?
> > >
> >
> > I've not spent much time looking at Generics yet. I have allot to
> > learn
> > in this area.
> >
>
> According to the JSR:
> == begin quote ==
> It is explicitly not required that the system
> ...
> b) Support the use of primitive types as type arguments: While
> allowing the use of primitive types (e.g., int, boolean) as type
> arguments would be nice, it should not be a goal of the design. The
> separation of primitive and reference types is a fundamental property
> of the Java programming language.
> == end quote ==
>
> So, it appears generics are no panacea.  At least not in the Java
> universe.
>

There is a separate proposal related to auto-boxing and unboxing of
classes like java.lang.Integer that will deal with some of the leftover
pain.  If I read the examples correctly, it will mean that things like
"int" and "java.lang.Integer" will be essentially interchangeable at the
source code level.  This was discussed in the technical keynote at
JavaOne, and seems quite likely to be part of Tiger (J2SE 1.5) also.

> Here's the entire JSR: http://jcp.org/en/jsr/detail?id=14
>
> Brent Worden
> http://www.brent.worden.org/

Craig

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message