What are stackable modifications?
问题 I've been reading a book about Scala and there's mention of stackable modifications using traits . What are stackable modifications and for what purposes are they meant to be used? 回答1: The fundamental quality which distinguishes stackable modifications (as the terminology is used in scala anyway) is that "super" is influenced dynamically based on how the trait is mixed in, whereas in general super is a statically determined target. If you write abstract class Bar { def bar(x: Int): Int }