Link Details

Link 100934 thumbnail
User 111696 avatar

By bloid
via blog.thinkrelevance.com
Published: Aug 05 2008 / 01:28

I have chosen four languages which together represent "Java.next": Clojure, Groovy, JRuby, and Scala. At first glance, these languages are wildly different. Clojure is a Lisp. Groovy is the "almost Java" choice. JRuby has the beauty of Ruby, and the mindshare of Rails. Scala, unlike the others, brings the notion that we need more static typing.
  • 11
  • 2
  • 1470
  • 321

Comments

Add your comment
User 116586 avatar

Jacek replied ago:

0 votes Vote down Vote up Reply

Checked exceptions are the best part of Java. I wrote a whole system in C# without checked exceptions and it was a nightmare once you start dealing with interfaces and multiple implementations. Checked exceptions are NOT a failed experiment.

User 191349 avatar

raveman replied ago:

0 votes Vote down Vote up Reply

it is failed experiment. the problem with checked exception is that you have to deal with them, i never had a need to deal with SQLException. it should be some kind of warning and easier way to ignore exceptions that you not care about.if you dont think "what will happen if file wont exist" you should not deal with FileNotFoundException. If you think "what might go wrong that i should deal with" - you can find unchecked exception and deal with it.

User 85500 avatar

andrewm replied ago:

1 votes Vote down Vote up Reply

as with jacek, i also find a mixture of checked and unchecked exceptions to be very useful in my work. perhaps as you (raveman) imply, the way to go is to retain checked exceptions and then by default methods do not have to check exceptions (preventing the "throws" clauses from propagating through the code base). then, a method could be marked as "checked" if it wanted to be explicit about catching checked exceptions.

E.g.

if method 1 was:

void method1() throws CheckedException {...}

and method2 by default is "unchecked" then it can call method1() without declaring that it may throw something:

void method2() { method1();...}

but if we wanted to make sure we got all checked exceptions at some point we could do:

void checked method3() { try { method2(); } catch (CheckedException e){...}}

Andrew

User 116586 avatar

Jacek replied ago:

0 votes Vote down Vote up Reply

You've never had to deal with a SQL exception and properly roll things back in an open transaction? Nice.

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.

Voters For This Link (11)



Voters Against This Link (2)