Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #13669
| From | Joshua Cranmer <Pidgeot18@verizon.invalid> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: no more primitive data types in Java (JDK 10+). What do you think? |
| Date | 2012-04-19 19:36 -0500 |
| Organization | A noiseless patient Spider |
| Message-ID | <jmqb3d$6m2$1@dont-email.me> (permalink) |
| References | <jmq71h$su0$1@speranza.aioe.org> |
On 4/19/2012 6:27 PM, Nasser M. Abbasi wrote: > According to > > "To Java SE 8, and Beyond! Simon Ritter Technology Evangelist, Oracle" > > (Google the string "To Java SE 8 and Beyond!" and click on > the PDF file, about the 5th link down the page) > > On page 42, it says: > > "Unified type system (JDK 10+) > No more primitives, make everything objects" > > I've seen very little discussion on this very important > subject. First off, this is listed as an idea (explicitly differentiated from the earlier bullet points which were presented more as "we really want this to get in"). > What do the experts here think of the idea? > > For me, and I am no expert, I think it will be good to have > a consistent type model (everything is an object), but I am > worried that the performance will take a hit (computational finite > elements methods, large meshes, etc...), unless PC's and computers > will become 1000 times faster by the time JDK 10+ comes in few years > from now, which might be possible. The Java language was designed when JIT technology was still moderately weak. Thanks in large part to Java, the performance of JITs has drastically improved over the last two decades, while the onset of JavaScript as a major performance target for JITs has also focused some of the research into improving performance in those cases. Note that JavaScript doesn't distinguish between integers and floating points (all arithmetic in JS is 100% double!), not to mention the problems related to weak and dynamic typing. This means that the performance assumptions of what would be slow aren't necessarily the case. A lot of it depends on how the "removal" of primitive types work, especially considering the need for backwards compatibility in Java. If they decide to make minimal changes to the VM spec (which, given history, has been the case), then it may just be compiler sugar for certain operations. Then again, the slides also indicate a more forceful modification to the Java type system. The change, in short, strikes me much more of a "let int be treated as a subclass of Object." Theorizing possible implementation strategies, it's extremely feasible [1] to let the cost of this change in terms of performance be limited entirely to where int is actually used as an Object--i.e., where it would need to be boxed/unboxed. Given that the JVM is already capable of optimizing away boxing/unboxing even now, I suspect that the cost would be even lower than that. In other words, it's a feature you won't pay for unless you use it. [1] Basic implementation idea: make a shell class (i.e., the internal int.class object) otherwise unobservable that inherits from Object. Whenever you "convert" int -> Object, wrap it in that shell class. It's fairly simple to implement--I ended up doing something similar in an undergrad compilers course. -- Beware of bugs in the above code; I have only proved it correct, not tried it. -- Donald E. Knuth
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
no more primitive data types in Java (JDK 10+). What do you think? "Nasser M. Abbasi" <nma@12000.org> - 2012-04-19 18:27 -0500
Re: no more primitive data types in Java (JDK 10+). What do you think? Arne Vajhøj <arne@vajhoej.dk> - 2012-04-19 20:02 -0400
Re: no more primitive data types in Java (JDK 10+). What do you think? Lew <lewbloch@gmail.com> - 2012-04-19 17:31 -0700
Re: no more primitive data types in Java (JDK 10+). What do you think? Robert Klemme <shortcutter@googlemail.com> - 2012-04-20 15:45 +0200
Re: no more primitive data types in Java (JDK 10+). What do you think? glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2012-04-20 15:05 +0000
Re: no more primitive data types in Java (JDK 10+). What do you think? Robert Klemme <shortcutter@googlemail.com> - 2012-04-20 19:32 +0200
Re: no more primitive data types in Java (JDK 10+). What do you think? BGB <cr88192@hotmail.com> - 2012-04-20 20:47 -0700
Re: no more primitive data types in Java (JDK 10+). What do you think? Peter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com> - 2012-04-19 17:45 -0700
Re: no more primitive data types in Java (JDK 10+). What do you think? Arne Vajhøj <arne@vajhoej.dk> - 2012-04-19 21:22 -0400
Re: no more primitive data types in Java (JDK 10+). What do you think? "Nasser M. Abbasi" <nma@12000.org> - 2012-04-19 21:16 -0500
Re: no more primitive data types in Java (JDK 10+). What do you think? Peter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com> - 2012-04-19 23:11 -0700
Re: no more primitive data types in Java (JDK 10+). What do you think? Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2012-04-19 21:35 -0300
Re: no more primitive data types in Java (JDK 10+). What do you think? Arne Vajhøj <arne@vajhoej.dk> - 2012-04-19 21:31 -0400
Re: no more primitive data types in Java (JDK 10+). What do you think? Lew <lewbloch@gmail.com> - 2012-04-19 19:22 -0700
Re: no more primitive data types in Java (JDK 10+). What do you think? Peter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com> - 2012-04-19 23:15 -0700
Re: no more primitive data types in Java (JDK 10+). What do you think? BGB <cr88192@hotmail.com> - 2012-04-20 07:45 -0700
Re: no more primitive data types in Java (JDK 10+). What do you think? Lew <noone@lewscanon.com> - 2012-04-20 08:20 -0700
Re: no more primitive data types in Java (JDK 10+). What do you think? BGB <cr88192@hotmail.com> - 2012-04-20 19:57 -0700
Re: no more primitive data types in Java (JDK 10+). What do you think? Lew <noone@lewscanon.com> - 2012-04-21 04:25 -0700
Re: no more primitive data types in Java (JDK 10+). What do you think? Leif Roar Moldskred <leifm@dimnakorr.com> - 2012-04-21 07:05 -0500
Re: no more primitive data types in Java (JDK 10+). What do you think? BGB <cr88192@hotmail.com> - 2012-04-21 07:42 -0700
Re: no more primitive data types in Java (JDK 10+). What do you think? Lew <noone@lewscanon.com> - 2012-04-21 12:55 -0700
Re: no more primitive data types in Java (JDK 10+). What do you think? BGB <cr88192@hotmail.com> - 2012-04-21 13:27 -0700
Re: no more primitive data types in Java (JDK 10+). What do you think? Lew <noone@lewscanon.com> - 2012-04-21 13:34 -0700
Re: no more primitive data types in Java (JDK 10+). What do you think? BGB <cr88192@hotmail.com> - 2012-04-21 14:01 -0700
Re: no more primitive data types in Java (JDK 10+). What do you think? glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2012-04-21 23:48 +0000
Re: no more primitive data types in Java (JDK 10+). What do you think? Lew <noone@lewscanon.com> - 2012-04-21 17:46 -0700
Re: no more primitive data types in Java (JDK 10+). What do you think? Gene Wirchenko <genew@ocis.net> - 2012-04-20 08:08 -0700
Re: no more primitive data types in Java (JDK 10+). What do you think? glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2012-04-20 16:46 +0000
Re: no more primitive data types in Java (JDK 10+). What do you think? Lew <lewbloch@gmail.com> - 2012-04-20 12:52 -0700
Re: no more primitive data types in Java (JDK 10+). What do you think? Lew <noone@lewscanon.com> - 2012-04-20 08:17 -0700
Re: no more primitive data types in Java (JDK 10+). What do you think? Peter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com> - 2012-04-20 09:02 -0700
Re: no more primitive data types in Java (JDK 10+). What do you think? Lew <lewbloch@gmail.com> - 2012-04-20 12:48 -0700
Re: no more primitive data types in Java (JDK 10+). What do you think? David Lamb <dalamb@cs.queensu.ca> - 2012-04-20 21:08 -0400
Re: no more primitive data types in Java (JDK 10+). What do you think? glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2012-04-21 01:55 +0000
Re: no more primitive data types in Java (JDK 10+). What do you think? Lew <noone@lewscanon.com> - 2012-04-21 04:28 -0700
Re: no more primitive data types in Java (JDK 10+). What do you think? Joshua Cranmer <Pidgeot18@verizon.invalid> - 2012-04-19 19:36 -0500
Re: no more primitive data types in Java (JDK 10+). What do you think? Tsukino Usagi <usagi@tsukino.ca> - 2012-04-20 15:27 +0900
Re: no more primitive data types in Java (JDK 10+). What do you think? Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2012-04-20 07:04 -0300
Re: no more primitive data types in Java (JDK 10+). What do you think? Tsukino Usagi <usagi@tsukino.ca> - 2012-04-20 22:17 +0900
Re: no more primitive data types in Java (JDK 10+). What do you think? Robert Klemme <shortcutter@googlemail.com> - 2012-04-20 15:59 +0200
Re: no more primitive data types in Java (JDK 10+). What do you think? Thufir <hawat.thufir@gmail.com> - 2012-04-20 14:21 -0700
Re: no more primitive data types in Java (JDK 10+). What do you think? Arne Vajhøj <arne@vajhoej.dk> - 2012-04-20 19:11 -0400
Re: no more primitive data types in Java (JDK 10+). What do you think? Tsukino Usagi <usagi@tsukino.ca> - 2012-04-20 22:16 +0900
Re: no more primitive data types in Java (JDK 10+). What do you think? Robert Klemme <shortcutter@googlemail.com> - 2012-04-20 15:55 +0200
Re: no more primitive data types in Java (JDK 10+). What do you think? Patricia Shanahan <pats@acm.org> - 2012-04-20 07:49 -0700
Re: no more primitive data types in Java (JDK 10+). What do you think? Arne Vajhøj <arne@vajhoej.dk> - 2012-04-20 19:19 -0400
Re: no more primitive data types in Java (JDK 10+). What do you think? BGB <cr88192@hotmail.com> - 2012-04-21 07:58 -0700
Re: no more primitive data types in Java (JDK 10+). What do you think? rossum <rossum48@coldmail.com> - 2012-04-20 20:08 +0100
Re: no more primitive data types in Java (JDK 10+). What do you think? Lew <lewbloch@gmail.com> - 2012-04-20 12:54 -0700
Re: no more primitive data types in Java (JDK 10+). What do you think? glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2012-04-20 21:48 +0000
Re: no more primitive data types in Java (JDK 10+). What do you think? Lew <lewbloch@gmail.com> - 2012-04-20 16:45 -0700
Re: no more primitive data types in Java (JDK 10+). What do you think? glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2012-04-21 01:56 +0000
Re: no more primitive data types in Java (JDK 10+). What do you think? Lew <noone@lewscanon.com> - 2012-04-21 04:35 -0700
Re: no more primitive data types in Java (JDK 10+). What do you think? Jim Janney <jjanney@shell.xmission.com> - 2012-04-20 16:24 -0600
Re: no more primitive data types in Java (JDK 10+). What do you think? Arne Vajhøj <arne@vajhoej.dk> - 2012-04-20 19:08 -0400
Re: no more primitive data types in Java (JDK 10+). What do you think? Joshua Cranmer <Pidgeot18@verizon.invalid> - 2012-04-20 18:14 -0500
Re: no more primitive data types in Java (JDK 10+). What do you think? Arne Vajhøj <arne@vajhoej.dk> - 2012-04-20 19:22 -0400
Re: no more primitive data types in Java (JDK 10+). What do you think? Arne Vajhøj <arne@vajhoej.dk> - 2012-04-20 20:36 -0400
Re: no more primitive data types in Java (JDK 10+). What do you think? Roedy Green <see_website@mindprod.com.invalid> - 2012-04-20 05:33 -0700
Re: no more primitive data types in Java (JDK 10+). What do you think? Bernd Nawothnig <Bernd.Nawothnig@t-online.de> - 2012-04-20 20:53 +0200
Re: no more primitive data types in Java (JDK 10+). What do you think? Gene Wirchenko <genew@ocis.net> - 2012-04-20 13:36 -0700
Re: no more primitive data types in Java (JDK 10+). What do you think? Bernd Nawothnig <Bernd.Nawothnig@t-online.de> - 2012-04-21 10:20 +0200
Re: no more primitive data types in Java (JDK 10+). What do you think? Gene Wirchenko <genew@ocis.net> - 2012-04-23 10:24 -0700
Re: no more primitive data types in Java (JDK 10+). What do you think? BGB <cr88192@hotmail.com> - 2012-04-24 14:39 -0700
Re: no more primitive data types in Java (JDK 10+). What do you think? Lew <lewbloch@gmail.com> - 2012-04-24 15:06 -0700
Re: no more primitive data types in Java (JDK 10+). What do you think? BGB <cr88192@hotmail.com> - 2012-04-24 17:07 -0700
Re: no more primitive data types in Java (JDK 10+). What do you think? Lew <noone@lewscanon.com> - 2012-04-25 00:48 -0700
Re: no more primitive data types in Java (JDK 10+). What do you think? BGB <cr88192@hotmail.com> - 2012-04-25 08:20 -0700
Re: no more primitive data types in Java (JDK 10+). What do you think? Lew <noone@lewscanon.com> - 2012-04-25 08:59 -0700
Re: no more primitive data types in Java (JDK 10+). What do you think? BGB <cr88192@hotmail.com> - 2012-04-25 10:32 -0700
Re: no more primitive data types in Java (JDK 10+). What do you think? Tsukino Usagi <usagi@tsukino.ca> - 2012-04-29 23:03 +0900
Re: no more primitive data types in Java (JDK 10+). What do you think? BGB <cr88192@hotmail.com> - 2012-04-29 10:28 -0700
Re: no more primitive data types in Java (JDK 10+). What do you think? BGB <cr88192@hotmail.com> - 2012-04-21 08:55 -0700
Re: no more primitive data types in Java (JDK 10+). What do you think? Lew <noone@lewscanon.com> - 2012-04-21 12:56 -0700
Re: no more primitive data types in Java (JDK 10+). What do you think? BGB <cr88192@hotmail.com> - 2012-04-21 13:41 -0700
Re: no more primitive data types in Java (JDK 10+). What do you think? Silvio Bierman <silvio@moc.com> - 2012-04-20 16:50 +0200
Re: no more primitive data types in Java (JDK 10+). What do you think? Arne Vajhøj <arne@vajhoej.dk> - 2012-04-20 19:04 -0400
csiph-web