Skip to main content
10 events
when toggle format what by license comment
S Mar 16, 2014 at 6:40 history suggested Dan Lugg CC BY-SA 3.0
Fix grammar, stream-of-concious style, minor formatting
Mar 16, 2014 at 5:42 review Suggested edits
S Mar 16, 2014 at 6:40
Jul 18, 2011 at 8:43 comment added quant_dev @Falcon OK, you're right.
Jul 18, 2011 at 8:32 comment added Falcon @quant_dev: You get reuseability in the OOP sense wrong. It means that a single method can operate on many datatypes, thanks to interface sharing. That's a major part of OOP code reuse. And inheritance automatically let's us share interfaces, thus enhacing code reuseability greatly. That's why we talk about reusability in OOP. Just creating libraries with routines is nearly as old as programming itself and can be done with almost every language, it's common. Code-Reuse in OOP is more than that.
Jul 18, 2011 at 7:52 comment added quant_dev @Falcon Sharing interface != sharing code. At least not in the usual sense.
Jul 14, 2011 at 7:30 comment added Falcon @quant_dev: Reusability in OOP means first of all polymorphy. And inheritance is a critical point for polymorphic behaviour (sharing the interface).
Jul 3, 2011 at 11:22 vote accept JW01
Jul 14, 2011 at 16:15
Jul 2, 2011 at 21:33 comment added Jonny Dee Ok, if you insist on a perfect definition you're right. Inheritance expresses an 'is-a' relationship and it is this fact which allows for polymorphism and provides a way of extending an API. But in practice, inheritance is very very often used to reuse code. This is especially the case with multiple inheritance. And as soon as you call code of a super class you are actually reusing code.
Jul 2, 2011 at 21:00 comment added quant_dev "Inheritance is not code reuse".
Jul 2, 2011 at 13:49 history answered Jonny Dee CC BY-SA 3.0