Open valoeghese opened 2 weeks ago
Add inheritance, but all properties must be private
there must be inheritance tax, indeed
I feel strongly against it Inheritance is a feature so messed up only Java Devs can use it. Therefore, I believe it is not a good idea for any serious project
What if instead inheritance, you could cherrypick some behavior from a class e use it on yours?
Maybe we can have a look into how it works in nature. The default there is that you will inherit different traits from one parent and others from the other parent.
So maybe it is a solution to inherit from two classes simultaneously and choose at random which behaviour is used?
Maybe if the parent class could specify different sets of traits to be inherited based on randomness and combination of factors.
For instance, it's random for the child to be of a type annotated by a unsigned 1 digit number.
A class could annotate that only children with X or Y type inherit the traits.
No kidding, this would be awesome.
But you can only remove properties from subclasses