From brian.goetz at oracle.com Sat Jun 21 01:41:30 2014 From: brian.goetz at oracle.com (Brian Goetz) Date: Fri, 20 Jun 2014 21:41:30 -0400 Subject: JEP: Extending generics to support primitive type arguments Message-ID: <53A4E2CA.9090603@oracle.com> I've submitted the following JEP for extending generics to support primitive type arguments: https://bugs.openjdk.java.net/browse/JDK-8046267 Comments welcome! From pbenedict at apache.org Thu Jun 26 18:20:36 2014 From: pbenedict at apache.org (Paul Benedict) Date: Thu, 26 Jun 2014 13:20:36 -0500 Subject: JEP: Extending generics to support primitive type arguments In-Reply-To: <53A4E2CA.9090603@oracle.com> References: <53A4E2CA.9090603@oracle.com> Message-ID: 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 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! > >