On Thu, Jul 14, 2011 at 10:59 PM, George Moschovitis <
[email protected]> wrote:

> Thanks for the release, but why don't you use Future?


The Future<?> interface is fundamentally defective because it uses checked
exceptions.

Checked exceptions are one of the handful of gross design flaws of the Java
language.  It's notable that not a single modern language in the post-Java
era - not even the typed languages (groovy, scala, clojure, ceylon) -
include the checked exception.  It was one of those theoretically good ideas
that just turned out to be wrong.  But, like the JCP, it's one of those ugly
warts we just can't seem to get rid of.

If you use Future<?>, you're stuck with catching InterruptedException and
ExecutionException *everywhere* in your code.  Or you do what Google does
and use FutureHelper everywhere.  This is bullshit.  I'm not going to do it
in my code, and I'm not going to expect anyone else to do it.

Objectify's async api is built around the same principle.  There is a
Request<?> interface that works almost exactly like Future<?> but throws
runtime exceptions instead of the crappy checked exceptions.  I wish I could
use the same interface for BatchFB but I can't without making one project
rely on the other.  I blame the asshats at Sun (now Oracle) for dogmatically
sticking to this anachronism and refusing to let the language evolve; this
is one of the reasons the web development community has abandoned Java and
moved on to Ruby and Python.  It pisses me off.

Jeff

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to