Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Robert Klemme 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 15:45:23 +0200 Lines: 19 Message-ID: <9vd7jjFn9sU1@mid.individual.net> References: <4f90a788$0$286$14726298@news.sunsite.dk> <30566772.52.1334881887716.JavaMail.geo-discussion-forums@pbts20> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net DvLrH6tqrOBTr9wiPJkcrAahYyqzw33b/Z19q828x0nx2F4bg= Cancel-Lock: sha1:bKIaSRM88WwBo9ksBkoWN6wLarU= User-Agent: Mozilla/5.0 (X11; Linux i686; rv:11.0) Gecko/20120329 Thunderbird/11.0.1 In-Reply-To: <30566772.52.1334881887716.JavaMail.geo-discussion-forums@pbts20> Xref: csiph.com comp.lang.java.programmer:13689 On 04/20/2012 02:31 AM, Lew wrote: > There's also the point that source distinctions might look different in bytecode or machine code. What we might think of as an 'int' object at the source level might be treated as an ordinary machine integer at the lower level. As an additional data point: Ruby MRI works like that. Basically integers (instances of class Fixnum) look like ordinary objects but under the hood the value is encoded in the reference and there is no object on the heap. You get a nice consistent model for the language user but avoid the overhead of GC. Ruby is still not a racing car compared with other PL - usual trade offs apply. The concept is described here: http://en.wikipedia.org/wiki/Tagged_pointer It could require a signicifant (nice typo, sounds like an animal) change in the JVM definition though. Kind regards robert