To be blunt, your examples do not show the actual power of Mixins. What you show could be better implemented by adding behaviours to the Person class and its various descendants. Perhaps showing that dogs and persons can share some common behaviours, but cannot descend from the same base class
As for Generics, do you think that using single-letter variable names, specified by convention, is a good idea? This is not Rails. We strive towards giving things good names because it helps. Let's not regress when specifying generics
Your Future examples have almost exactly the same behaviour as a regular call: wait until the call returns
Cheers
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
To be blunt, your examples do not show the actual power of Mixins. What you show could be better implemented by adding behaviours to the Person class and its various descendants. Perhaps showing that dogs and persons can share some common behaviours, but cannot descend from the same base class
As for Generics, do you think that using single-letter variable names, specified by convention, is a good idea? This is not Rails. We strive towards giving things good names because it helps. Let's not regress when specifying generics
Your Future examples have almost exactly the same behaviour as a regular call: wait until the call returns
Cheers