[3193] in java-interest
Re: java-interest-digest V1 #244
daemon@ATHENA.MIT.EDU (Michael Lorton)
Thu Nov 2 21:10:07 1995
Date: Thu, 2 Nov 1995 14:54:05 -0800
From: Michael Lorton <mlorton@eshop.com>
To: larrys@zk3.dec.com
Cc: java-interest@java.sun.com
In-Reply-To: <9511021554.AA10544@alpha.zk3.dec.com> (larrys@zk3.dec.com)
> It is true that there are recoverable and unrecoverable errors -
> the problem is, it cannot be safely determined which are which
> until the design of the application is taken into account. By presuming
> beforehand without this knowledge, you will merely make the language
> unsuitable for use with applications of certain designs.
The language *forces* you to catch apparently-recoverable errors; it
*allows* you to catch apparently-unrecoverable errors.
> Many GUI programs will operate multiple windows and running out of
> memory while open- ing a new one is a very common error.
Then catch OOM exceptions..
> As for checking every pointer dereference, that is something that
> simply _must_ be done, for if it is not
It *is* done, by the run-time system. If a null-pointer is detected,
the system throws an (unrecoverable) exception. Writing code to
handle null-pointer exception is certainly possible, but usually (you
should excuse the phrase) pointless, since dereferencing a
null-pointer is always a software bug, though in a production system,
nice neat failures may be a plus.
M.
-
This message was sent to the java-interest mailing list
Info: send 'help' to java-interest-request@java.sun.com