As @daniel-c-sobral said, List extends the trait Seq and is an abstract class implemented by scala.collection.immutable.$colon$colon
(or ::
for short), but technicalities aside, mind that most of lists and seqs we use are initialized in the form of Seq(1, 2, 3)
or List(1, 2, 3)
which both return scala.collection.immutable.$colon$colon
, hence one can write:
var x: scala.collection.immutable.$colon$colon[Int] = null
x = Seq(1, 2, 3).asInstanceOf[scala.collection.immutable.$colon$colon[Int]]
x = List(1, 2, 3).asInstanceOf[scala.collection.immutable.$colon$colon[Int]]
As a result, I'd argue than the only thing that matters are the methods you want to expose, for instance to prepend you can use ::
from List that I find redundant with +:
from Seq and I personally stick to Seq by default.