4 ms·
Artima wrote an article describing how the use of traits (along with other scala features) can contribute to increased compile times.[1] FTFA: "... the compile
by leothekim 13y ago
Artima wrote an article describing how the use of traits (along with other scala features) can contribute to increased compile times.[1]
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."
[1] http://www.artima.com/articles/compile_time.html http://www.artima.com/articles/compile_time.html