-
methods giving the number of X are written
nX
, example:nElements
-
variables/arguments representing type class instances are written using the type class name in lower camel case, possibly with the type parameter appended. Example:
val group: Group[A]
, orval groupA: Group[A]
-
for the order of method parameters, when the definition of
argY
depends on the value ofargX
, the order of parameters isargX
thenargY
-
when a method accepts a
Set[Int]
, acollection.BitSet
can be provided for performance -
when a method accepts a
Iterable[G]
, and the iterable size is quite small, a fast path is provided forWrappedArray[G]
- avoid mixing singleton types and default parameters in methods, see SI-9611