Traits vs. Aspects in Scala. Scala provide a mixin composition mechanism that has been missing in Java. Roughly speaking, you can think of as analogous to Java interfaces, but with implementations. , those written in AspectJ , are another mechanism for mixin composition in Java. Changes for AOT compilation - Clojure. Abc: The AspectBench Compiler for AspectJ - Publications.