Scala seems to be fun

January 28, 2009 · Posted in Java · Comment 

The second day of Jfokus was an ordinary conference day, with separate tracks and many talks to choose between.

JavaFX

The key note talk at the beginning described JavaFX, SUNs new “SilverLight and Flash” killer. The demo showing how to flip through a book with very realistic behaviour, was impressive. On the other hand I’m not convinced SUN is gonna make it. MS is pushing out SilverLight in each Windows Update and SUN simply have not that capability to “pre-load” desktop browsers with the appropriate plugin. Remember the applet war ten years ago. Don’t get me wrong - I like JavaFX, however I’m pessimistic. Anybody still remembering JINI?

Capuchin

The second talk I attended was Ericsson’s new JavaME+Flash/light environment. I’m even more pessimistic about this new tool. It might be a bright piece of technology - I cannot really judge without getting my hands on it. However, will it ever be supported by other vendors? Will it be open source? How many of Ericssons own phone models will have it? There are way too many questions, before one starts to invest time and money on a new (isolated) platform.

Groovy

After lunch it started to be fun. First there was a talk about Groovy support in JetBrains’ IntellijIDEA. I have been using IDEA since the beginning of 2002 and usually uses the latest version all the time. For me personally there wasn’t anything new, becuase I have done some Groovy and Grails hacks using IDEA already. But the presentation was fun and entertaining and hopefully it inspired some in the audience to embark the Groovy way.

JPA 2.0

I realized that EJB3 / JPA still is not my cup of tea. Either I prefer something more high-level, like Grails or something more low-level, like Spring’s JDBC-Template.

Puke

A fun role playing of the importance of thinking and not following, when it comes to productive software development. A standpoint I fully support.

JRockit

Some interesting optimization techniques for the JRockit JVM. However, why did they start to compete with SUN in the first place?

Java++

Ola Bini is always fun to see on stage. He outlined the future of Java as a system implementation language and new dynamic languages on top of the JVM, such as Groovy, Scala, JRuby and others. I fully agree. Java has over the years become a dinosaur and it’s time to move on. Sort of, the same evolution as for 15-20 years ago when C faded away for C++.

Scala

My best experience of the day was Jonas BonĂ©r talking about Scala. I have been curious about Scala a while now, but haven’t really reached above the threshold of actually reading and playing around with it. This has now changed. I’m a Groovy advocate, but will over this year make room for Scala as well. I doubt Scala is ready for prime time yet - not because any technical limitations, rather because of commercial aspects. But the day will come and I will be ready that day.

Scala seems to be a multi-paradigm language; static typing but allowing dynamic type constructs, object oriented programming, functional language programming and actors based concurrent programming. I really like the latter. As far as I understand, the support for message passing is inspired by the Erlang programming language. Back in the beginning of the 90’s, as did some hacks in Erlang, like a simulator for a small phone exchange with support for connecting it to a real PBX exchange (MD110). This was part of my teaching course in real-time systems programming, for Royal Inst of Technology in Stockholm. Besides of Erlang, I used Concurrent C++ as well in the course. Those were the days.

I have never liked the path taken by the current support of concurrency in Java. Doug Lea’s library, which now is the java.util.concurrent package, is simply the wrong way to go. Not because the library is bad - it is not. But, the users are . . . I mean, it is inherently difficult to design concurrent programs right. As soon it starts to be a little more complex, than a bunch of threads doing some asynchronous work. Message passing is the right way to realize concurrent programs. It is a pity, my implementation of thread method invocation from 2002 never got any attention. Well, that’s life. If you are interested, you can find the article here.

Summary

The first presentation about WebSockets and the last presentation about Scala, was my personal highlights of the 2009 JFokus conference.