"Ruinous inheritance" (again)
Quote from AntC on April 7, 2026, 3:25 am(Quoted from DBE Ch 19, attrib Gaius)
Would you be surprise by the claim
the actual central concept in Object Orientation is Inheritance, a mechanism for programming by modularly extending partial specifications of code.
I was, though I readily confess I don't really 'get' OOP. More discussion on Lambda-the-Ultimate.
I'm afraid the doco (supposedly a draft of a text? book) is long and rambling, and chiefly a vehicle for some highly opinionated invective. Does anyone know this François-René Rideau? Is anything of what he says a valid contribution to the theory of OOP? (It seems to me to mostly contradict the 'conventional wisdom', as found for example on wikip.)
It'll come as no surprise round here opinionated opinions disagreeing with wikip doesn't put me off in itself. Making one characteristic the (only) "central concept" of a whole programming paradigm does, though, seem ... ambitious. Specifically, Inheritance (without further specificity) strikes me as neither sufficient, nor even necessary. YMMV.
It did spur me to come up with a counter-example, extending (hah!) the "all circles are ellipses" thread.
* A square is-a rectangle is-a quadrilateral.
* A square is-a regular polygon (which rectangles generally aren't).
* A rectangle is-a orientable figure (has property prone vs upright);
as is-a ellipse; as aren't square nor circle.
(Quoted from DBE Ch 19, attrib Gaius)
Would you be surprise by the claim
the actual central concept in Object Orientation is Inheritance, a mechanism for programming by modularly extending partial specifications of code.
I was, though I readily confess I don't really 'get' OOP. More discussion on Lambda-the-Ultimate.
I'm afraid the doco (supposedly a draft of a text? book) is long and rambling, and chiefly a vehicle for some highly opinionated invective. Does anyone know this François-René Rideau? Is anything of what he says a valid contribution to the theory of OOP? (It seems to me to mostly contradict the 'conventional wisdom', as found for example on wikip.)
It'll come as no surprise round here opinionated opinions disagreeing with wikip doesn't put me off in itself. Making one characteristic the (only) "central concept" of a whole programming paradigm does, though, seem ... ambitious. Specifically, Inheritance (without further specificity) strikes me as neither sufficient, nor even necessary. YMMV.
It did spur me to come up with a counter-example, extending (hah!) the "all circles are ellipses" thread.
* A square is-a rectangle is-a quadrilateral.
* A square is-a regular polygon (which rectangles generally aren't).
* A rectangle is-a orientable figure (has property prone vs upright);
as is-a ellipse; as aren't square nor circle.
Quote from dandl on April 7, 2026, 9:12 amMy take is: bollocks! The core benefit of OO is quite simply: objects. Little packets of scope with related data and function that you can think about, implement, create and destroy, etc, etc. It took me years to really 'get it', and this constant focus on inheritance just blurred those benefits.
Turns out inheritance does have its place, but it's hard get right and mostly best avoided.
My take is: bollocks! The core benefit of OO is quite simply: objects. Little packets of scope with related data and function that you can think about, implement, create and destroy, etc, etc. It took me years to really 'get it', and this constant focus on inheritance just blurred those benefits.
Turns out inheritance does have its place, but it's hard get right and mostly best avoided.