[Prev][Next][Index][Thread]

Re: New Lisp ?



Jeffrey Siegal <jbs@quiotix.com> writes:

> Andreas Bogk wrote:
> > As soon as you pile up some layers of code, it quickly becomes tedious
> > to pass around handlers everywhere.  Just imagine passing a GUI dialog
> > for resolving a "disk full" condition all the way through the GUI,
> > your application code, your storage abstraction down to the actual
> > disk access.
> 
> What happens in Java is that you have to at least declare the exceptions
> up the chain anyway (the compiler will reject a method that doesn't
> catch or throw E which involves a method declared to throw E.  It isn't
> that much harder to explicitly pass the handler.  

Not completely true for Java. If you use  RuntimeException or an
instance of a subclasses of RuntimeException, you dont have to 
declare it in throws clauses. 

Ref.: 
http://java.sun.com/j2se/1.3/docs/api/java/lang/RuntimeException.html



References: