Why are so few things @specialized in Scala's standard library?
问题 I've searched for the use of @specialized in the source code of the standard library of Scala 2.8.1. It looks like only a handful of traits and classes use this annotation: Function0 , Function1 , Function2 , Tuple1 , Tuple2 , Product1 , Product2 , AbstractFunction0 , AbstractFunction1 , AbstractFunction2 . None of the collection classes are @specialized . Why not? Would this generate too many classes? This means that using collection classes with primitive types is very inefficient, because