Craig R. McClanahan wrote:
>>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.
>
>
>Craig
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>
>
>
It does seem that the spec defines a fully backward compatible
implementation such that pre 1.5 packages will still function in the 1.5
environment. Ideally we should develop [math] to provide implementations
efficient on both pre 1.5 and 1.5. Its probably easier to battle over
design now for pre-1.5 than wait around for the final implementation of
Generics to go fully in that direction.
But...
There is a prototype compiler available on the Sun EA site for
1.5/generics. It would make for some interesting sandbox projects to
begin exploring alternate implementations of various commons projects
for this compiler as a stepping stone for taking advantage of the
capabilities that will be available in 1.5. Possibly someone could draw
together demos/examples of such usage so that Jakarta projects can take
advantage of such information to build "roadmaps" to 1.5 capabilities in
the near future. Doing this now before the 1.5 release would place
Jakarta at a significant advantage to leverage these capabilities and
provide new implementations in a "timely" manner that corresponds to
the release of 1.5 to the public.
-Mark
--
Mark Diggory
Software Developer
Harvard MIT Data Center
http://www.hmdc.harvard.edu
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
|