On Tuesday, July 30, 2013 10:51:47 AM UTC-4, Yann Simon wrote:
Understand.
I tough you were speaking about dependency management with traits.
traitA {
this: DependencyTrait =>
...
}
Right, I should clarify that, thanks. I'm talking about implementing the cake pattern without having a clearly defined need for it; i.e. cake for the sake of cake.
Self types of course are not necessarily evidence of having implemented cake. Could be a concrete hasA relationship, which is how I sometimes use self types. e.g.
abstract class DAO[Entity](implicit db: DataBaseComponent) extends QueryWrapper {
self: DAOContract[Entity] =>
...
}
Anyway, dependency management
may be better served by Guice, Subcut, or other established library.
Tired of rolling my own, that's what brought me to Play.