Search

Categories

Links

Referers

EclipseCon 2007

Mar 06 2007, 09:42:57 AM PST »Java Comments [6]

Alex and I are on stage at EclipseCon 2007 waiting to give our presentation, unfortunately this means that we are missing Scott Adams who we can hear from the conference room next to ours.

So if you're interested in hearing our talk on Java SE 7 language features, now would be a good time to head down to Santa Clara Convention Center. We start at 10:10am.

Post a Comment:
Comments are closed for this entry.
Comments:

Hey Peter, It's a very nice talk. Interesting subject. I'm sitting on the from row, most left person from your POV. Regards, Jeroen

Posted by Jeroen Leenarts on March 06, 2007 at 10:52 AM PST #

I just updated the slides (the OpenJDK link was broken).

Posted by Peter von der Ahé on March 06, 2007 at 02:27 PM PST #

Great presentation! So far, I really like the judiciousness with which Java has been extended. It is also nice to see lots of things currently being discussed for Java SE 7. Strangely, a few of my favorites have been completely missing from public discussion:
  • Multiple dispatch, open classes: http://multijava.sourceforge.net/
  • Mixins: How come G. Bracha has lost his interest in them? I still think they are very useful.
  • Generators: very useful for iterator implementation. http://docs.python.org/tut/node11.html#SECTION00111000000000000000000
  • Self-types: if additionally we had a variant of Map.put() that returned "this", we would not even need map literals, we could just use method chaining. Well, OK, after googling for a reference, it seems like ... someone ... has thought about adding this to Java: http://blogs.sun.com/ahe/entry/selftypes
  • Linq-style extended types and querying mechanisms for collections. I can see myself using that much more than XML literals (would those not make Java syntax much more complicated?). http://msdn2.microsoft.com/en-us/netframework/aa904594.aspx
Apart from that, I get the feeling that scripting languages such as Python get more programmer love, not because they are dynamically typed, but because they pay great attention to their standard API: Python allows negative list indices for accessing elements from the end backwards, has slicing, join(), various tool functions for iterators and collections. Furthermore, it has a few very useful small modules such as one for reading and writing CSV data. Axel

Posted by Axel Rauschmayer on March 07, 2007 at 01:59 PM PST #

Alex,

Oh boy, how wrong you are if you think Gilad has lost interest in mixins.

Anyways, you come across as a guy with excellent taste in language design. However, we should (and can) only do so much in each revision of the language. Evolution, not revolution.

I simply think that reification, closures, and super packages are the most important things we need to do in the next revision. Self types is a neat thing that most developer probably wouldn't notice. Similar to covariant return types. Reification is much more important than that because it makes it harder to learn generics. So I say stop the clock and fix generics (that is add reification), once we have completed this task, we can look at other areas of generics that could be improved.

Posted by Peter von der Ahé on March 07, 2007 at 04:17 PM PST #

This selection of essential features (reification, closures, and super packages) sounds right.
  • GB and generics: I'm glad to hear that (I guess that once you've written a mixin calculus...). An improved version of generics might also enable mixins, though, via "class Mixin<T> extends T". Furthermore, interfaces already almost give us mixins. Actually, one could do mixins as interfaces with an attached implementation. Then one would not have to change the JVM and would just add the implementation to every class that implemented the interface. There would be code duplication, but that would not matter to me that much.
  • Fixing generics: I also don't like the disconnect between arrays and collections. I'm not sure how to fix this, as it is just a feeling. The disconnect might be reduced by reification, but it appears in many places (e.g., having to constantly use Arrays.asList is OK for Java experts but really stupefies beginners---I know from teaching my students).
  • Closures: Some of the current closure proposals feel strange, because they provide function signatures without giving Java first-class (top-level) functions.
  • Super packages: Nice and cleanly designed feature, kind of a module version of "friends".
Reactive programming in Java is still not much fun, because you end up writing many (Event, Listener) pairs including the listener handling code. If closures give us method pointers and explicit bean contracts (=properties) give us automatic property change events, then this issue is practically solved. My favorite solution would be that you could not just override methods of the super object, but also methods of associated objects (i.e. object A references object B and overrides a method m---as long as it refers to B). Then an event is nothing more than a method invocation that one can observe.

Posted by Axel Rauschmayer on March 08, 2007 at 11:45 AM PST #

I think the Java platform does excellent reactive programming: http://blogs.sun.com/chrisoliver/entry/f3

Posted by Peter von der Ahé on March 08, 2007 at 07:07 PM PST #

Java is a trademark of Sun Microsystems, Inc.
Copyright © 2006,2007 Peter von der Ahé