Actions
Feature #10489
openAdd inherit method for clearer and multiple inheritance
Feature #10489:
Add inherit method for clearer and multiple inheritance
Description
A new and more intuitive syntax:
class B
end
class A
inherit B
end
Instead of (but keeping this for backwards compatibility):
class B
end
class A < B
end
Besides, this allows multiple inheritance. Also, inherit could be implemented with just extend plus include?
Updated by xiewenwei (xie wenwei) almost 11 years ago
Bráulio Bhavamitra wrote:
A new and more intuitive syntax:
class B end class A inherit B endInstead of (but keeping this for backwards compatibility):
class B end class A < B endBesides, this allows multiple inheritance. Also,
inheritcould be implemented with justextendplusinclude?
Module is "multiple inheritance" for ruby. I don't think it is a good idea.
Updated by naruse (Yui NARUSE) almost 5 years ago
- Target version deleted (
3.0)
Updated by hsbt (Hiroshi SHIBATA) over 1 year ago
- Status changed from Open to Assigned
Actions