User talk:Manthonyaiello

I've recently worked on Subtyping. What do yo have in mind? I hope not more OOP... Pcap ping  17:26, 25 August 2009 (UTC)


 * No - Less, actually. There's more to the notion of a subtype than just Liskov's behavioral subtypes, and the notion of a subtype is (consequently) bigger than just a feature of OOP. Consider, for example, subtypes in Ada, which are defined by specifying a subrange of an existing type (and on which all of the operations of the existing type apply). While you could argue this is a kind of behavioral subtype (you can use an instance of Natural anywhere an Integer is called for, the substitutability applies), it doesn't depend on OOP constructs.


 * But that article does't focus on OOP or behavioral subtyping, but on subtpying as normally defined in type theory for languages with referential transparency. Have you read it recently? Surely it could use some expansion... Pcap ping  11:00, 26 August 2009 (UTC)


 * There's also more to the notion of inheritance and the polymorphism available through subclassing than is captured by Liskov's behavioral subtype. In particular, there's nothing to prevent the C++ or Java programmer, for instance, from actually strengthening the precondition on an overridden method, nor from weakening the postcondition. Either of which would violate substitutability in Liskov's terms. So would you say that the new subclass is not a subtype of its superclass? By what definition? Certainly it's not a behavioral subtype, but the compiler certainly will let you use an instance of the subclass in, say, a list of the superclass.


 * I've made it clear in the LSP article that (strong) behavioral subtyping is actually undecidable. (Just in case anyone imagined it's implemented by some compiler...) Pcap ping  11:00, 26 August 2009 (UTC)


 * Really, I think the organization could be improved and, most particularly, the article needs citations (at the least Liskov's presentation at OOPSLA '87 should be cited when it's referenced in the text). I plan to hunt around and build up some references before I make any changes; that'll probably take a couple of days. M. Anthony Aiello 19:58, 25 August 2009 (UTC)


 * I've done some more work on the LSP article. It now covers the basics correctly now, I think. Feel free to improve it further; see the history log for what else should be added. The first reference (Leaven's book) seems the best source for a Wikipedia-level article. As for inline citations, these are generally frowned upon in math or theory articles, especially when article is based mainly on few sources, as it is the case here. One does not need exact quotes for math-related matters since the same notion can be presented differently but equivalently. Guys from WP:WikiProject Mathematics regularly remove that kind of inline citations from math articles; see also Cite_sources. Yeah, you can argue the line from the lead is a quotation, but it's just a mathematical definition; those aren't normally given an inline citation. Only obscure facts are given an inline citation; to give an example off the top of my head see Birkhoff's HSP theorem for instance. I'm not going to stop you from adding footnotes to either subtyping or LSP, just don't overdo it... Pcap ping  11:00, 26 August 2009 (UTC)