Warning: Some posts on this platform may contain adult material intended for mature audiences only. Viewer discretion is advised. By clicking ‘Continue’, you confirm that you are 18 years or older and consent to viewing explicit content.
No. Duck types (including virtual subclasses) considered harmful; use real inheritance if your language doesn’t provide anything strictly better.
It is incomparably convenient to be able to retroactively add “default implementations” to interface functions (consider for example how broken readinto is in Python). Some statically-typed languages let you do that without inheritance, but no dynamically-typed language can.
This reads more as a rant against inheritance (without any explanation whatsoever) than a legitimate argument.
No. Duck types (including virtual subclasses) considered harmful; use real inheritance if your language doesn’t provide anything strictly better.
It is incomparably convenient to be able to retroactively add “default implementations” to interface functions (consider for example how broken
readinto
is in Python). Some statically-typed languages let you do that without inheritance, but no dynamically-typed language can.This reads more as a rant against inheritance (without any explanation whatsoever) than a legitimate argument.