Jump to content

Talk:Polymorphism: Difference between revisions

(→‎Fortran: Comment to OOP example)
 
(One intermediate revision by one other user not shown)
Line 1:
==Circle is a Point?==
Hi, I think there's a big conceptual error in the code examples: Almost all of them derive a Circle class from a Point class. This is IMHO conceptually wrong; derivation would mean that a circle ''is-a'' point, which is clearly not the case. You wouldn't normally pass circles to functions expecting points (say, a function returning the straight line through two points).
 
:''It's probably worth noting that the center of a circle is a point. (This issue was treated in some of the sample code in this section, but was not even touched on in the surrounding discussion. That said, a relevant underlying issue might be that polymorphism has little to do with abstraction.) --[[User:Rdm|Rdm]] 13:59, 26 October 2011 (UTC)''
 
The task, as described, doesn't demand to make that error (although I suspect that whoever wrote that task had this wrong derivation in mind).
6,962

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.