In lieu of trait arguments
问题 Here's what I want to write: val alg10 = new GeneticAlgorithm[FlatDesign] with PhenotypeSize(10) with FlatDesignMutator with ChildrenReplaceParents(numChildren=2) with TargetFitnessFunction(targetPhenotype) with PopulationSize(40) with RunLength(numGenerations=100) In other words, there are lots of constraints and parameters I'd like to set. For example, PhenotypeSize(10) has implications for the mutator and the fitness function. Abstract types ought to make it easy to implement/enforce all