Path: csiph.com!usenet.pasdenom.info!aioe.org!.POSTED!not-for-mail From: glen herrmannsfeldt 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:05:37 +0000 (UTC) Organization: Aioe.org NNTP Server Lines: 15 Message-ID: References: <4f90a788$0$286$14726298@news.sunsite.dk> <30566772.52.1334881887716.JavaMail.geo-discussion-forums@pbts20> <9vd7jjFn9sU1@mid.individual.net> NNTP-Posting-Host: H0vc4U5LIRkRHNPyGCs2dA.user.speranza.aioe.org X-Complaints-To: abuse@aioe.org User-Agent: tin/1.9.6-20100522 ("Lochruan") (UNIX) (Linux/2.6.32-5-amd64 (x86_64)) X-Notice: Filtered by postfilter v. 0.8.2 Xref: csiph.com comp.lang.java.programmer:13696 Robert Klemme wrote: > On 04/20/2012 02:31 AM, Lew wrote: (snip) > 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. I have used arrays dimensioned [1] in Java where I needed a primitive type as an object. I believed at the time that it was faster than the other ways to do it. -- glen