Leo Sutic wrote:
> A lookup failing is an exceptional
> case, and should be treated as such.
I think this is the key issuse here.
Example, I might change the behavior of a component, if another
component it requires is missing (this happens in Cocoon a lot)
This is *not* an exceptional case, but a straightforward programming
flow.
Making the exceptions thrown a RuntimeException allows people that
consider lookups an exceptional case to use try/catch and those who use
it as a programming flow, to use normal method calls (or ignore the
exists() alltogether)
As for the argument that try/catch enforce good programming practices, I
can point you to a bunch of
try {
...
} catch (Exception e) {}
examples even in high-quality code that show you this is *NOT* the case:
you can't force programmers to be smart, but you can give them tools
that match their differences.
--
Stefano Mazzocchi One must still have chaos in oneself to be
able to give birth to a dancing star.
<[EMAIL PROTECTED]> Friedrich Nietzsche
--------------------------------------------------------------------
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>