Re: redesign exception
On 10/26/2014 3:56 PM, boxzou@gmail.com wrote:
@Eric,
I don't care about hit counts. But I do want to draw the attention of Java developers to the deficiency of Java exceptions.
But IMHO the O.P. is just trying to generate hit counts for his
blog, and/or troll.
I'm sorry if I have wronged you. However, no one with any sense of
what is practical would imagine that Java could be changed in such a
fundamental way: Such a change would invalidate all or very nearly all
the existing Java code, and there's a *lot* of existing Java code. One
might as well suggest improving Java by making integer overflow throw an
exception the way division by zero does: That would be an improvement,
I think (if accompanied by non-overflowing `unsigned' types), but there
is simply no way such a change could be contemplated at this late date.
If you're interested in designing a language that improves upon Java
you might certainly choose a different scheme for handling exceptional
circumstances. Note that it would be difficult to make a non-exception
language run on the JVM because the JVM is *required* to throw actual
Java exceptions in certain circumstances, but there might be ways to
intercept those and convert them to your language's preferred form. Or,
of course, you could use something other than the JVM as your substrate.
But changing Java so as to invalidate the many millions of lines of
existing code and re-spend the many millions of Flanian Pobble Beads
already invested in developing them? Not a chance. No way. No.
--
esosman@comcast-dot-net.invalid