It's hardly broken; as with any code, one must understand how and why it works, what are its limitations, and not go about applying it blindly to every situation (eg. a deep compare of nested data structures). In any case, the simple-minded (shallow) approach is usually the one that is wanted for this task, especially when writing in OO-style.