This is the mail archive of the kawa@sources.redhat.com mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: FW: Kawa and BSF



> Throwing a checked exception is a contract between your code and an
> end-users calling code that delimits exactly these circumstances where you
> _know_ in advance something may go wrong.  Users are forced into this
> contract at (javac) compile time, which is good and proper - they need to
> acknowledge what can reasonably go wrong, and what they're going to do about
> it (throws it on again, or catch it).

This is a bit like the argument about staticly typed languages and
dynamically typed languages. I have to agree with Per Bothner here
on two levels. Firstly, Kawa is first and foremost Scheme, and
Scheme is runtime typed. (If you love all this stuff about "contracts"
why are you using Scheme? :-). Secondly, I have to say that the Java
model of checked exceptions is a brain dead idea. Every time you write
an app you end up writing a class called MyAppException. Then every
method in the Universe ends up throwing MyAppException. Eventually
you say to hell with it and make MyAppException a RuntimeException.
Another example is applications that do a lot of database manipulation.
You end up that everything in the universe throws SQLException.
Doesn't buy you anything.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]