On Tue, Aug 26, 2008 at 6:13 PM, Michele Simionato
<[EMAIL PROTECTED]> wrote:
> I not completely against multiple inheritance. I am against multiple 
> inheritance
> as it is now. A restricted form of multiple inheritance in which mixins 
> classes
> are guaranteed to be orthogonal would be fine with me (provided it is
> not abused).
> This concept exists already in other languages, the orthogonal mixins
> are called "traits".

I must correct myself here. Even if for practical purposes traits look
like a restricted multiple
inheritance, in principle it is better to think of them as of an
enhanced single inheritance.
With traits there is always a single superclass: traits are just
single inheritance with a nice
syntax to include methods (like in Ruby) and a guarantee that methods
will not be overridden
silently (this one is missing in Ruby).


   M.S.
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to