Path: csiph.com!aioe.org!5Avcpu9drOe6MAssky6/+Q.user.gioia.aioe.org.POSTED!not-for-mail From: =?UTF-8?Q?Arne_Vajh=c3=b8j?= Newsgroups: comp.lang.java.programmer Subject: Re: JSR 401 Date: Thu, 1 Apr 2021 18:52:23 -0400 Organization: Aioe.org NNTP Server Lines: 29 Message-ID: References: NNTP-Posting-Host: 5Avcpu9drOe6MAssky6/+Q.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.9.0 Content-Language: en-US X-Notice: Filtered by postfilter v. 0.9.2 Xref: csiph.com comp.lang.java.programmer:39680 On 4/1/2021 11:31 AM, e.d.pro...@gmail.com wrote: > On Thursday, April 1, 2021 at 8:13:31 AM UTC-4, Eric Sosman wrote: >> Has anyone else studied the working drafts of the forthcoming JSR >> 401? It's an attempt to unify "primitives" and "objects" in a >> future Java, making it possible to have a List instead of >> List, or a Map instead of Map, >> and so on. It would also allow arrays of generic types, like >> JList[], relieving an irritation that's nagged us since the >> dawn of generics. >> >> But there's a drawback: Although arrays of objects (even of >> generic types) will work, arrays of primitives would no longer be >> possible! That is, you could no longer create or use an int[], but >> would need to use something like an ArrayList instead. I'm not >> intimate with the inner workings of the JVM and I fail to >> understand some of the problems the working papers describe, but it >> has something to do with the fact that an array knows the type of >> its elements and a primitive doesn't actually have a "type" in the >> sense of belonging to a class hierarchy. > Writing List because it can't accept List has been a > minor nuisance. Having to change every int[] to ArrayList would > be a gigantic nuisance. What date is it today? Arne