On Thu, 3 Jul 2003 [EMAIL PROTECTED] wrote:

> Date: Thu, 03 Jul 2003 08:21:22 -0700 (PDT)
> From: [EMAIL PROTECTED]
> Reply-To: Jakarta Commons Developers List <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to