How to declare traits as taking implicit “constructor parameters”?
问题 I'm designing a class hierarchy, which consists of a base class along with several traits. The base class provides default implementations of several methods, and the traits selectively override certain methods via abstract override , so as to acts as stackable traits/mixins. From a design perspective this works well, and maps to the domain so that I can add a filtering function from here (one trait) with a predicate from here (another trait) etc. However, now I'd like some of my traits to