`implements` #144

Closed
satyr opened this Issue Jul 2, 2012 · 3 comments

3 participants

@satyr
Owner
class C implements D, E
  ...

would roughly be equal to:

class C
  prototype <<<< D
            <<<< E
  ...

<<<< over <<< for flattening.

@quarterto

Might lead people to expect interfaces. How about a Scala-like class C extends D with E?

@satyr
Owner

Might lead people to expect interfaces.

Interfaces as in Java don't make much sense without static typing though. I think implements for mixins/traits works since the goal--providing additional sets of behaviors--is the same. It's already reserved, so we can make use of it with no drawbacks.

How about a Scala-like class C extends D with E?

Wouldn't parse because:

$ coco -bce 'D with E then'
D((function(){}.call(E)));

is already valid.

@vendethiel

Really interesting

@satyr satyr closed this in 1b3c163 Jul 4, 2012
@vendethiel vendethiel referenced this issue in jashkenas/coffeescript Sep 29, 2012
Closed

Multiple inheritance? Mixins? #452

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment