Re: [scala-language] The cake’s problem, dotty des ign and the approach to modularity.

"przemek.pokrywka" <[email protected]>
Newsgroups gmane.comp.lang.scala
Message-ID <[email protected]>
Thanks Martin. "Invites abuse" is the best summary of Cake pattern I have seen so far.

Many traps have been listed here already. I'd like to mention another one. In many examples you will find Cakes, that provide one or more member vals for other Cake layers. Say Database trait has connection val. That seemingly innocent construct actually means, that the entire Cake is now unable to use more than one database, because traits can be mixed-in only once.
This is an example of Robot Legs Problem, to which Cake pattern doesn't offer a solution. For code example please see:

http://stackoverflow.com/questions/5190328/can-the-cake-pattern-be-used-for-non-singleton-style-dependencies/5200297#5200297

Przemek

-- 
You received this message because you are subscribed to the Google Groups "scala-language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.