One thing that I've had the need for several times now is to make “private” mixins. That is, I want to use mixins for composition but not for typing.
Let's say I have traits
trait Iface { ... }
trait Behavior { self: Iface => ... }
I'd like to be able to write
class Impl extends Iface with private Behavior { ... }
so that `Behavior' does not become part of `Impl's type. IOW, I cannot now write:
val b: Behavior = new Impl
Why do I want this? Because I don't want anyone to rely on this behavior: the fact that I'm mixing in Behavior is only an implementation artifact, and users of `Impl' shouldn't be allowed to rely on this.
marius.