title: instanceof considered harmful?
body: <p>I am looking over some code that has heavy use of Java's <code>instanceof</code> operator.  I will fight the temptation to go into details, since this is a general question.  <code>instanceof</code> reminds me of of c++'s dynamic cast, and the advice I read about it, long ago, that if you think you need it, probably your model is off. Is this still the conventional wisdom?  Does it apply to Java's <code>instanceof</code>? </p>