Talk:Subtyping

message: I disagree with the move from "subtype" to "subtype and derived type".  These two distinct concepts should have separate articles.  --Doradus 04:22, May 24, 2005 (UTC)
:I agree they should have separate articles in the future but since derived type was quite short, I don't see a need to talk it in a different article in this moment. After all, we have to discuss the difference between subtype and derived types. -- Taku 06:09, May 24, 2005 (UTC)
::I disagree.  A short article is called a stub.  It's perfectly acceptable.  It makes no sense to regress an article away from the state it should eventually reach. --Doradus 15:58, May 29, 2005 (UTC)
:I am reverting my move. I tried to add the discussion between the difference between the two, but I couldn't explain it well (I know they are not the same.) -- Taku 12:50, May 31, 2005 (UTC)
The "bird example" appears to me like turning things upside down: The existence of different animals that have some characteristics in common has imho lead to the creation of the more general concept called "bird". But the article describes that the "generic object "bird" (or, supertype) gives rise to three derived objects (or, subtypes) "duck", "cuckoo" and "ostrich"." --- These particular types of birds, as well as others, exist independently from the "supertype" bird. If anything has derived from something, it would be the "superclass" bird which has been created in the process of observing different types of animals with common characteristics and attempting to generalize. The diagram used even shows "bird" as "derived" from the different types of animals.
What I fail to understand is that: "if A is a subclass of B, then an instance of class A may be used in any context where an instance of type B is expected". This would mean, for example, that all types of birds would have to be able to swim and to dive like ducks can. As for classes, I fail to see in which way A would be a subclass of B, for A would have to have at least all characteristics of B in order to allow full substitution. A could even have more characteristics than B, so that B could not be used as a substitute for A in any case. What would this make of B? Maybe my understanding is flawed; is it actually the intention of this article to explain that a subclass can be "superior" to its superclass, and that it must be at least as extensive (in its datatypes, for instances of subtypes) as its superclass to allow full substitution? How much does the extend of substitutability depend on the (rest of) the programming, like: The rest of the programming is not (or is) demanding a cuckoo to swim or to dive, though (or because) "cuckoo" is a subclass of "bird"? --- Lee-0 (talk) 13:35, 17 January 2008 (UTC)
thread_title: Move to "subtype and derived type"

message: The article has been tagged with an  tag for no stated reason. Based on the edit history of the user who tagged it, the complaint seems to be the lack of discussion of "behavioral subtyping". As far I can tell, that simply means covariance/contravariance of arguments/return type of methods (that is function types). So, this article is not missing anything fundamental in that respect, except the typing rule for function subtyping and its OOP nickname. I'll add that to the article shortly. Pcap ping 17:56, 25 August 2009 (UTC)
thread_title:  Behavioral subtyping 

message: What do you guys think of adding an intro diagram?  The text intro makes no sense to me.  A diagram would or could convey the message nicely.  Something similar or same as bird diagram.  Thanks, Daniel.Cardenas (talk) 18:49, 11 June 2012 (UTC)
thread_title: Intro Diagram