extends keyword instead of <superclass ... >

Juan Ignacio Dopazo dopazo.juan at gmail.com
Tue Mar 29 13:13:59 PDT 2011


Mixins are a great idea. Whatever decision is made about the position and
name of the inheritance declaration, they add a lot of value and are very
easy to understand.

A couple of related ideas:

class Vector {
    <superclass: Point, uses: Comparable>
}

"uses" looks like a better fit. It's shorter and it's already used by many
documentation generators (YUI Doc comes to mind). Also, more than one mixin
could be easily added:

class Vector {
    <superclass: Point, uses: [Comparable, Measurable]>
}

Juan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20110329/e5a37c30/attachment.html>


More information about the es-discuss mailing list