My understanding of Rust Koans - #2 by DanielKeep is that it actually has nothing to do with traits vs inheritance, but everything to do with "do you have to list all traits/superclasses at time of defining a struct" ?
For example:
-
Common Lisp Object System - Wikipedia definitely has a class hierarchy. I'm pretty sure the problem can be solved in CLOS.
-
Even in plain Java, one can do "class BrotherFarbold implements interface CookingDuties"
==
My understanding of that koan is that it makes two assumptions:
-
with traits, you can add new traits later on
-
with inheritance, you haver to define everything in inherit from up front when the class is defined
==
I am not sure I agree with (2).