Content deleted Content added
Szepi~enwiki (talk | contribs) Trying to understand the first sentence of the article. |
|||
Line 97:
Hi, just writing a short note why I removed this section (I forgot to log in, but it was me :)), I think the section would probably make an interesting blog post, but it is not suitable for this article. It does not describe polymorphism, it describes something that uses it to achieve a very specific unrelated goal. Nor does it help the reader to better understand polymorphism. If you would insist on keeping it on Wikipedia, it would be less out of place in an article about circular dependency references. Additionally, it provided very little introduction, dropping the reader right into a technical detail of a very a different subject. [[User:Grauw|Grauw]] ([[User talk:Grauw|talk]]) 00:19, 13 January 2010 (UTC)
After further thinking, I removed my Perl (counter) example and comments, because I have even more basic questions, and, in retrospect, my example was not quite right.
''Subtype polymorphism, almost universally called just polymorphism in the context of object-oriented programming, is the ability to create a variable, a function, or an object that has more than one form.
''
I think the sentence is unclear about who creates the variable, function or object.
After some thinking I believe the sentence want to say that it is the programmer whose ability we are talking about. So maybe, the sentence should be changed to (for clarity):
''Subtype polymorphism, almost universally called just polymorphism in the context of object-oriented programming, is the ability of the programmer to create a variable, a function, or an object that has more than one form.
''
Still, I do not really like this sentence.
What does it mean to create a variable that has more than one form?
What is the form of a variable? Same problem with a function.
Does creating a function means writing a function? How can one function have multiple forms? A function identifier might refer to multiple functions in different contexts. I understand this.
For an object, does creating it means instantiating it? Or is it the act of writing the code for the class that the object belongs to?
Now, if we mean the act of instantiation: What does it mean that the object created can have multiple ''forms''?
What does it mean for the object to have a single form? What is a form? Type?
I could go on.. But it would be nice if someone would clarify these things before I go any further (I feel that I am already speculating too much about the intention of the author). In summary, a little more precision would help.
[[User:Szepi|Szepi]] ([[User talk:Szepi|talk]]) 04:49, 5 February 2011 (UTC)
== Polymorphism is not exactly what this article claims it is ==
|