This post originated from an RSS feed registered with Agile Buzz
by James Robertson.
Original Post: Confusion of terms
Feed Title: David Buck - Blog
Feed URL: http://www.cincomsmalltalk.com/rssBlog/buck-rss.xml
Feed Description: Smalltalk can do that
It bugs me when I read books or articles about object oriented languages and they get the definitions of terms wrong.
Take "polymorphism" for example. Webopedia defines it like this:
In object-oriented programming, polymorphism refers to a programming language's ability to process objects differently depending on their data type or class.
Excellent. I agree fully. Unfortunately, they continue like this:
More specifically, it is the ability to redefine methods for derived classes.
That's where they go wrong. It may be most common for subclasses to redefine methods, but there should be nothing stopping an arbitrary class from implementing a method and having it used polymorphically with other implementations.
Languages like Java and C# don't support this, but they at least support the concept of interfaces which allow something close. A class that implements an interface certainly isn't a derived class.
I've seen the same confusion in several different books. In my experience, poor wording and poorly defined terms cause great amounts of confusion - especially for people trying to learn the language.