Bitter Cake

The Cake Pattern is a hugely popular way of constructing Scala applications based on mixed-in code components.

So what’s wrong?

  1. global namespace; name collisions; broken locality of knowledge
  2. prefer composition over inheritance
  3. testing the wrong things - blurred responsibilities 
  4. refactoring - harder
  5. more perm-gen space, more classloading
  6. cannot have final classes (unless sealed)

comments powered by Disqus