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



> The Java exception model is fine.  


I'm willing to be convinced, but how do you overcome my reservations above?

> The C++ exception model; that's
> brain-dead, if you're looking for something to pick on.  I don't know if you
> speak for Per here,


I don't I'm a mere lurker, spouting off my own personal nonsense :-)

> but you seem to be saying that you're not using Java
> exceptions properly because you don't agree with them, or can't be bothered
> with them.  Fair enough, but my point is still that this could actually make
> things harder for Kawa's users as they have to worry about catching all
> run-time exceptions and then worry what type they are.  Better to throw
> nothing IMO.


Isn't that kinda the nature of exceptions? Either you catch everything
and give a user message "failed because of foo", or you special case
on particular exceptions and take special action on those? There's
really only those options isn't there?


> They say learning Scheme makes you a better programmer so perhaps you've all
> transcended and don't need any anal type-safe and checked mechanisms
> anymore.  


The problem with static type checking is that it is a limitation on good
design. For example, the other day writing Java I had cause for the
abstract notion of a "Clearable" class with method "clear()". I wanted
some java.util classes to be in this category. Trouble is, while they
implement clear(), I can't retrospectively force them to implement
Clearable. Even worse, Set and Map, while they both implement Clear() they
don't even have a shared interface with clear() in it.

In short, the trade off of a better, simpler, purer design trumps the
benefits of static typing, which causes half the problems it tries to solve.

> As it stands, Kawa reminds me of an old gem of a thrift shop,
> whose rickety exterior belies the treasures freely available for those brave
> enough to wander in.  Mild mannered and conservative Java programmers
> meanwhile will take one look at the way you're bandying RuntimeExceptions
> about, mewl, and run straight to the glitzy facades of JPython and NetRexx.
> Their loss perhaps, but they might have bought something.


If I was a true-blue Java fan I would program in Java, end of story. It's
pretty easy to compile a Java source file on the fly and dynamically load
the resulting byte code. Maybe you should complain to Sun that the Java
language is forcing you to catch all these exceptions which is 
interfering with the
"real world" of using the byte code machine with the Kawa language? :-)










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