You and William F. misunderstood Nikolay: he did NOT say "don't use
exceptions; they are a bad idea". He said it was the DISTINCTION
between 'checked' and 'unchecked' exceptions that is botched. He is
not alone in this claim, he is in good company. Even the deservedly
famous Java expert, author and teacher Bruce Eckel says something very
similar, saying, "It has been an experiment, which no language since
has chosen to duplicate."
He goes on to explain why the idea looks good in small examples, but
in larger programs it introduces more problems than it solves
("Thinking in Java" 3rd ed, chapter 9). But by no means is he against
using exceptions. He is only against the misuse of them that the
distinction encourages, e.g., subverting the exception handling
mechanism by writing 'spurious' code to suppress exceptions.
On Jul 25, 11:23 pm, Zsolt Vasvari <[email protected]> wrote:
> > A checked exception is an exceptional state that you expect to happen, like
> > the user entering some wrong values, you check that ant throw the ckecked
> > exception.
>
> No, exceptions shouldn't be used as a program flow control mechanism,
> which is what your example is.
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en