JEP: Extending generics to support primitive type arguments
Paul Benedict
pbenedict at apache.org
Thu Jun 26 18:20:36 UTC 2014
Brian, what a puzzler! This might be the most complex proposed feature yet.
It will be a treat to see how others solve the problem.
Here is my first comment...
Given T=int, I would like to see the JVM magically substitute in an
"object" that's backed by the primitive. I use "object" in quotes because I
am not referring to something that's instantiated per primitive value --
but some sort of synthetic singleton where all int primitives point to the
same one. Since there is no other state in this "object" but the value
itself, this seems okay. The primitive value is actually the "this" pointer
in the virtual method call.
Cheers,
Paul
On Fri, Jun 20, 2014 at 8:41 PM, Brian Goetz <brian.goetz at oracle.com> wrote:
> I've submitted the following JEP for extending generics to support
> primitive type arguments:
>
> https://bugs.openjdk.java.net/browse/JDK-8046267
>
> Comments welcome!
>
>
More information about the platform-jep-discuss
mailing list