Skip to main content

Reflection

Posted by editor on May 31, 2007 at 4:34 AM PDT

Contemplating the end of checked exceptions?

There's already been discussion of how to remove features from Java, most notably in a Mark Reinhold blog from last year and JSR 270, the JDK 6 release contents JSR. Thusfar, however, the discussion has primarily been around removing API's that are little-used or obsoleted by better successors. Surely nobody's talking about blowing away language features, especially ones that have been around since Java 1.0, right?

Well, actually...

Neal Gafter unintentionally happened across this course of action in the discussion of his closures proposal for JDK 7. As he writes in his blog Removing Language Features:

As a language grows by the addition of features, it necessarily gets more complex. After all, you can't remove existing language features because existing programs use those features, but each additional feature adds complexity. Right?

Fellow Googler Matt Shulman asked me a question about the Closures for Java specification. He observed that much of the complexity arises because of support for checked exceptions in the spec. Things like throws type parameters, disjunctive types, and throws clauses on function interfaces would be unnecessary without checked exceptions. Matt asked me if we had considered if things would be simpler without all that. [...]

Matt clarified that he was asking not just about removing support for checked exceptions from the Closures spec, but from the entire programming language.

This is a striking proposal when thought through all the way: could you horse-trade checked exceptions for a cleaner closures implementation? For those who don't like checked exceptions -- and there are a lot of them -- this has win-win written all over it. On the other hand, those who like checked exceptions and don't think closures are a good match for the language will see this as nothing short of a disaster. And there's also the problem of how such a radical change could even be kept compatible with existing Java implementations, or if this will necessarily lead to breakage, as discussed yesterday.

I am soooo staying out of this one. It's up to you guys and gals. Have at it...


Also Java Today, Builder.au interviews Bob Brewin in the article JavaFX Sends Sun Back to the Future? "Can Java's new eye candy engine -- JavaFX -- be the tonic to revive Java's flagging fortunes client-side? Sun's chief technology officer for software, Bob Brewin, certainly thinks so as he discusses the issues facing Sun with JavaFX, will it put Java back on the desktop and if the GPL licensing of Java warrants a re-license for CDDL projects. BuilderAU caught up with Brewin at the recent JavaOne conference."

With increasing number of features to support, growing code bases, and large teams to work with, developers naturally look to automation as a path to ensuring code quality. According to Matt Quail, a partner with Cenqua, however, some things about code quality are hard, and even impossible, to automate. In Artima's audio interview The Value of Code Reviews, Matt Quail of Cenqua talks about the role code reviews play in the development process.


The latest JavaOne Commmunity Corner Podcast is on Keaton: Calling QTKit from Java. "Want to play audio, video, or multimedia in a Java application? QuickTime for Java opened the door to Apple's extensive QuickTime library, but times are changing and QTJ seems headed for deprecation. In fact, Apple is pushing Mac developers away from the old procedural-C QuickTime API altogether. In its place is a new object-oriented, Cocoa-aligned framework called QTKit. Great for Objective-C programmers, but what about the Java crowd? The Keaton project, something of a successor to Lloyd, will create a one-to-one mapping of Java objects to Obj-C objects, so you can work with QTMovies and QTMovieViews directly in Java code. Come see this talk to see how it works and how you can use it in your Mac Java application."


In today's Weblogs, Gregg Sporar is still Talking About JavaOne 2007: "The topic for May's meeting of the Austin Java Users Group was JavaOne. Along with three others, I shared a few thoughts with the crowd. It was a very interesting discussion."

Jean-Francois Arcand has a Grizzly update in JRuby on Grizzly 1.5 now ready.....with asynchronous request processing support and soon Comet!: "The very tiny JRuby on Grizzly module is now shipping and will soon be part of the Grizzly official distribution. This release also support Asynchronous Request Processing, which is something new for the JRuby community."

Finally, Eamonn McManus has some new information on Custom types for MXBeans/ "MXBeans map between arbitrary Java types and a fixed set of
types in javax.management.openmbean called the Open Types. Up
until now the mapping rules were fixed. In the Java 7 platform,
we're planning to allow customization of the rules."


In today's Forums, wilkinp wonders Can JPA cope with a dynamic schema?: "I just need a quick sanity check here please I suspect that if I had a database schema where the number of columns in a table changed at runtime (i.e. the table definition is controlled by the application user), there is no way to effectively annotate a collection (representing the columns) dynamically at runtime. I realize I could avoid the dynamic column definition by moving what would have been the columns into rows, and giving each row a "column id", but I'm reluctant to do this as I'll end up with a massive number of rows."

techwriter needs to swap JavaHelp implementations in Need an alternate Javahelp search engine: "I have been facing this problem with JavaHelp for a few months now. I have created a JavaHelp system for my application and it works absolutely fine. However, I am not happy with the way the search works. As the JavaHelp search engine uses relaxation ranking and morphing, it returns strings other then what is needed. For example: if i give a search for "Workflow Modeling" it returns "modelling" or "workflow" or "a weird string that has workflow and modelling separated by even 20 words". I want my search engine to provide exactly the word i have searched for."

Finally, ellingdr asks about Namespaces included in XML Response. "How does JAXWS determine what namespaces declarations to include in the xml response of a web service call? My WSDL imports a couple of additional namespaces used by the request, however, the data types that make up the response are from a single namespace. The XML response includes the declarations for the unused namespaces. Does the response simply include all namespaces that are declared within the wsdl?"


Current and upcoming Java
Events
:

Registered users can submit event listings for the href="http://www.java.net/events">java.net Events Page using our href="http://today.java.net/cs/user/create/e">events submission form.
All submissions go through an editorial review before being posted to the
site.


Archives and Subscriptions: This blog is delivered weekdays as
the Java
Today RSS feed
. Also, once this page is no longer featured as the
front page of java.net it will be
archived along with other past issues in the href="http://today.java.net/today/archive/">java.net Archive.

Contemplating the end of checked exceptions?