Path: csiph.com!usenet.pasdenom.info!gegeweb.org!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: Joshua Cranmer Newsgroups: comp.lang.java.programmer Subject: Re: no more primitive data types in Java (JDK 10+). What do you think? Date: Fri, 20 Apr 2012 18:14:26 -0500 Organization: A noiseless patient Spider Lines: 27 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Fri, 20 Apr 2012 23:14:39 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="WpcHJSul77m+zlbR9GVqkA"; logging-data="14414"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/FiUl1c2VWZayC5JYIi7sqUcg03TrTGQk=" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0) Gecko/20120327 Thunderbird/11.0.1 In-Reply-To: Cancel-Lock: sha1:GoyCng8J57rG9oRwddywxktX8sA= Xref: csiph.com comp.lang.java.programmer:13722 On 4/20/2012 1:27 AM, Tsukino Usagi wrote: > It's impossible. Whatever they mean when they say "remove primitives" > cannot possibly be what those words actually mean. The term probably refers to unifying the type hierarchy such that the primitive types are logically subtypes of Object. In other words, remove the distinction between primitive and reference types. > 5.length() or 5.size()? Well if 5 is an object I should be able to > over-ride it. > > Class 6 Extends 14 {} 5 is an object instance, not a type that can be extended. Just like I can't say class Allegro extends System.out {}... > Is that what they mean, or do they mean they will just treat numbers > /like/ objects? I guess I need more information. In the absence of a > good reason, I don't believe such a change will ever actually make > it into Java. My guess is the main goal is to allow things like a true List (where the T data would be `int data') instead of List. -- Beware of bugs in the above code; I have only proved it correct, not tried it. -- Donald E. Knuth