A handy feature would be to add an import for scala.collection.immutable.Seq any time the Seq predef is used, unless scala.collection.Seq or scala.collection.mutable.Seq is already imported.
This would probably be disabled by default, but would be very handy for people who want to enforce immutable Seqs.
A useful example:
case class MyCaseClass(strings: Seq[String])
would become
scala.collection.immutable.Seq
case class MyCaseClass(strings: Seq[String])
We typically expect our case classes to be immutable, preventing a missed import from leading to unexpected behavior from side-effects is a nice thing to have.
A handy feature would be to add an import for
scala.collection.immutable.Seq
any time theSeq
predef is used, unlessscala.collection.Seq
orscala.collection.mutable.Seq
is already imported.This would probably be disabled by default, but would be very handy for people who want to enforce immutable
Seq
s.A useful example:
would become
We typically expect our case classes to be immutable, preventing a missed import from leading to unexpected behavior from side-effects is a nice thing to have.