Content deleted Content added
Reverted 1 edit by ShahzadCSharp (talk): Spam |
|||
(9 intermediate revisions by 7 users not shown) | |||
Line 1:
{{WikiProject
{{WikiProject Computing|importance=mid|software=yes|software-importance=mid}} {{WikiProject Computer science
}}
{{merged-from|Subclass (computer science)|16 December 2010}}
{{merged-from|Superclass (computer science)|16 December 2010}}
Line 35 ⟶ 37:
:Do you know some OOP language doesn't rely on inheritance at all but instead it uses delegation. Anyway, actually you didn't answer my question. what's wrong with the title inheritance (computer science)? My point is why OOP not computer science? Remember it really doesn't matter what is OOP since people have a different view about it. You think inheritance is a fundermantal OO concept while some don't. It is ok but we cannot impose our perception. Instead, we need to be more objective and nutral. In other words, it's really doesn't matter what is the truth here but what people believe the truth is. -- [[User:TakuyaMurata|Taku]] 03:42 19 May 2003 (UTC)
::The answer to your question is written clearly above but I'll repeat it - <
:First, please calm down. I don't mean to insult you or anything at all. We can just discuss about naming peacefully. No? My question is actually different than what you think. I am merely talking about why do you object naming inheritance (computer science). what's wrong with that? Do you think inheritance is NOT a computer science topic? Do you object the name inheritance (computer science) or do you think while it can be acceptable, inheritance (object-oriented programming) is better than it? -- [[User:TakuyaMurata|Taku]] 00:12 20 May 2003 (UTC)
Line 267 ⟶ 269:
: Agreed. As far as I know, private inheritance is a feature exclusive to C++, but the article presents it as some universal truth. —[[User:Galaktos|Galaktos]] ([[User talk:Galaktos|talk]]) 16:32, 16 August 2015 (UTC)
::Aren't private and protected inheritance effectively automated composition? [[User:Qwertyus|Q<small>VVERTYVS</small>]] <small>([[User talk:Qwertyus|hm?]])</small> 17:16, 16 August 2015 (UTC)
: Inheritance type may be related with [[Vendor_lock-in|Vendor lock-in]] from above ("vendor") code to successor ("customer") code. Also is convenient to watch to the table with inheritance as to unlocking action of some locked subject (code). [[User:RippleSax|RippleSax]] ([[User talk:RippleSax|talk]]) 21:23, 24 November 2015 (UTC)
== Delegation versus forwarding ==
The article states: "An alternative technique, explicit delegation,..." It presents delegation as a solution to the tension with subtyping when using inheritance for code reuse.
''Forwarding'' is a technique to work around this problem. A method of one class can forward its invocation to an instance that it holds. It is a simple call of a second method from within the originally invoked method, almost always on an instance separate from that to which the original message was sent. By convention the method selector used in the forwarded call is often the same as that for the original call.
''Delegation'' is a more intricate form of dispatching, whereby the method that finally executes does so in the context of the method doing the forwarding. Delegation almost almost requires language support and is usually implemented using techniques akin to those used for call-by-name semantics. The '''self''' language is an example of a language with delegation; I don't know of any others by name.
In a more vulgar sense, the solution alluded to in the paragraph in question is simple object encapsulation and simple method invocation on what is usually an "owned" object. The "forwarding" is in the eye of the designer.
Them term ''delegation'' is more properly used earlier in the article.
I suggest changing ''delegation'' to ''forwarding'' in this sentence.
[[User:Jcoplien|Jcoplien]] ([[User talk:Jcoplien|talk]]) 08:41, 11 May 2016 (UTC)
== Interscience ==
What are causes of variation [[User:Shawnjafi|Shawnjafi]] ([[User talk:Shawnjafi|talk]]) 21:25, 17 October 2016 (UTC)
|