----
in [1], tomp [2] posted:
That's one way to look at it, and it certainly is valid, to some extent.
Another way to look at it is that exceptions are fundamentally limited, and conditions provide a whole new sea of possibilities.
His example is rather awkward and actually confuses the reader, rather than excites. The point of conditions actually is to allow flexibility without all the if statements and delegates. His final getVal() function should look like this Object getVal() { try { if (val == null) throw new NoValException(); else return val; } catch (UseValRestart r) { return r.getVal(); } } and the high-level code should handle how the value is provided (either some specific value, user input, web request, random bits, etc...). So, one only has to write the code for getVal() once and can customize it indefinitely.
----