[ruby-core:66150] [ruby-trunk - Feature #10489] [Open] Add inherit method for clearer and multiple inheritance

From: brauliobo@...
Date: 2014-11-09 01:57:19 UTC
List: ruby-core #66150
Issue #10489 has been reported by Br叩ulio Bhavamitra.

----------------------------------------
Feature #10489: Add inherit method for clearer and multiple inheritance
https://bugs.ruby-lang.org/issues/10489

* Author: Br叩ulio Bhavamitra
* Status: Open
* Priority: Normal
* Assignee: Yukihiro Matsumoto
* Category: syntax
* Target version: Next Major
----------------------------------------
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`?




-- 
https://bugs.ruby-lang.org/

In This Thread

Prev Next