Primitives in Generics
dl at cs.oswego.edu
Sat Jul 10 11:34:12 PDT 2010
On 07/09/10 15:38, Brian Goetz wrote:
>> My take is that you have three choices:
>> A) Support function types covering primitives
>> B) Support primitives in generics
>> C) Do something that doesn't restrict your options to reconsider
>> (A) or (B) in Java8 in response to all the complaints about
>> sucky parallel performance.
> Indeed so. We believe we have chosen (C). If we have not, please say something!
On only a little thought, I don't know the answer. If someone could
provide a rough sketch for how either of these (presumably only (B)?)
could be done in Java8 given the Java7 plans, it would be a big comfort.
For one example of a generics system that accommodates both A and B
see the X10 specs:
Scala also comes close with upcoming "specialize" directives. See
or maybe some more recent docs?
(Also, to some extent, C#.)
I worry a bit because (1) the base generic type systems for
both are fairly different than Javas and (2) both implementations
are still in pre-release mode running on JVMs.
More information about the lambda-dev