My agreement about this is so strong that I had to be reminded recently that asserts had to be enabled in order to work. That is such a bad design (in my opinion) that I had reconstructed my view of the world and forgotten that assert is not a synonym for if/throw.
Lately, I view assert as almost as strong a signal of a latent bug as catch (Exception). On Sat, Mar 26, 2011 at 4:01 AM, Sean Owen <[email protected]> wrote: > The tragic thing about asserts is that they are a perfectly useful > construct, but because they are rarely used 100% correctly, must be left on, > and then both defeat their own purpose (might as well be an "if") and worse, > harm the program (overhead of checks that the programmer thought would be > off) This is essentially why we don't use it in Mahout. At least it's the > reason in my head.
