Scala 3's multiple inheritance is a bit different from Scala 2's. It feels quirky in the context of Scala 2, but the rules are easier to understand. Traits can now take parameters, but you're only allowed to apply them in the extends clause of a class (not another trait).
Really, why? Because it's performing a function too similar to `&` and `with`?
-
-
Well yeah, because there's already `with`. I think you can't use `&` in extends clause.
-
No, you can't use `&`. It needs to be something different because the order of inheritance is significant, whereas `&` doesn't imply any order (in other uses). I hope `with` gets phased out instead—I think that's the plan, anyway.
- Show replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.