51 points · by harlock81 · 13y ago · 7 comments
FTFA: "... the compile time cost of mixing in a trait compared to extending a superclass likely exists because the compiler must insert forwarding methods for all the methods declared in the trait into the body of the subclass when mixing in, but when extending a superclass it does not. Instead, the subclass simply inherits the superclass implementations of those methods. We did observe that the larger the number of methods to be mixed in the more the compile time was increased."
Here's a Cake Pattern and type class followups:
Slides
https://speakerdeck.com/marakana/ne-scala-2012-the-typeclass...
https://dl.dropbox.com/u/1679797/NE%20Scala/Bakery%20from%20...
videos of above: http://marakana.com/s/post/1397/2013_northeast_scala_symposi...