When Polymorphism Fails

When Polymorphism Fails

I love Java. I love OOP. I love polymorphism. But polymorphism does not always solve every problem I have. Something about sweeping statements of the form “If you use instanceof you are a complete idiot” have always bothered me (on many levels, but I’m referring here only to its technical aspect).

This nifty blog post by Steve Yegge made me feel better. It points out when polymorphism just will not do the trick (and has a nice recap/primer of polymorphism if you are a little rusty on it).

Just thought I’d share that.

–jsp

About these ads

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 64 other followers

%d bloggers like this: