On Sunday 06 June 2004 23:05, Florian Frank wrote:
> On 06.06.2004, at 19:23, Sean O'Dell wrote:
> > Please go into detail on this.  Why would type checking be an
> > indication of
> > weak OO design?
>
> You can usually get rid of those checks by using polymorphism. In Ruby
> it's
> possible to get rid of them without using inheritace but using duck
> typing
> instead. Consider this refactoring:

You can't morph everything.  What if you expect an entire tree of data loaded 
up from REXML, but instead got an open socket object?  You think you can 
polymorph an open socket object to behave like a REXML object.

Type checking is necessary in many, many instances.  It is not an indication 
of weak OO design.

	Sean O'Dell