Scala Programming Language
  1. Scala Programming Language
  2. SI-7402

List is not Serializable, which is confusing for users and causes lub-computation to infer a type of 250 lines

    Details

      Description

      The issue is that Nil and :: implement Serializable by being a case class/object, but the sealed abstract class List does not.

      This leads to huge types down the line:

      List(List(), Vector())
      

      ... results in the following type:

      List[scala.collection.immutable.Seq[Nothing] with
       scala.collection.AbstractSeq[Nothing]{def companion:
       scala.collection.generic.GenericCompanion[scala.collection.immutable.Seq with
       scala.collection.AbstractSeq{def dropRight(n: Int): scala.collection.immutable.Seq[Any] with
       scala.collection.AbstractSeq[Any]; def takeRight(n: Int): scala.collection.immutable.Seq[Any] with
       scala.collection.AbstractSeq[Any]; def drop(n: Int): scala.collection.immutable.Seq[Any] with
       scala.collection.AbstractSeq[Any]; def take(n: Int): scala.collection.immutable.Seq[Any] with
       scala.collection.AbstractSeq[Any]; def slice(from: Int,until: Int): scala.collection.immutable.Seq[Any]
       with scala.collection.AbstractSeq[Any]}]; def dropRight(n: Int):
       scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]{def
       companion: scala.collection.generic.GenericCompanion[scala.collection.immutable.Seq with
       scala.collection.AbstractSeq]; def dropRight(n: Int): scala.collection.immutable.Seq[Nothing] with
       scala.collection.AbstractSeq[Nothing]{def dropRight(n: Int):
       scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]; def
       takeRight(n: Int): scala.collection.immutable.Seq[Nothing] with
       scala.collection.AbstractSeq[Nothing]; def drop(n: Int): scala.collection.immutable.Seq[Nothing]
       with scala.collection.AbstractSeq[Nothing]; def take(n: Int):
       scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]; def slice(from:
       Int,until: Int): scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]};
       def takeRight(n: Int): scala.collection.immutable.Seq[Nothing] with
       scala.collection.AbstractSeq[Nothing]{def dropRight(n: Int):
       scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]; def
       takeRight(n: Int): scala.collection.immutable.Seq[Nothing] with
       scala.collection.AbstractSeq[Nothing]; def drop(n: Int): scala.collection.immutable.Seq[Nothing]
       with scala.collection.AbstractSeq[Nothing]; def take(n: Int):
       scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]; def slice(from:
       Int,until: Int): scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]};
       def drop(n: Int): scala.collection.immutable.Seq[Nothing] with
       scala.collection.AbstractSeq[Nothing]{def dropRight(n: Int):
       scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]; def
       takeRight(n: Int): scala.collection.immutable.Seq[Nothing] with
       scala.collection.AbstractSeq[Nothing]; def drop(n: Int): scala.collection.immutable.Seq[Nothing]
       with scala.collection.AbstractSeq[Nothing]; def take(n: Int):
       scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]; def slice(from:
       Int,until: Int): scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]};
       def take(n: Int): scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]
       {def dropRight(n: Int): scala.collection.immutable.Seq[Nothing] with
       scala.collection.AbstractSeq[Nothing]; def takeRight(n: Int):
       scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]; def drop(n:
       Int): scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]; def
       take(n: Int): scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing];
       def slice(from: Int,until: Int): scala.collection.immutable.Seq[Nothing] with
       scala.collection.AbstractSeq[Nothing]}; def slice(from: Int,until: Int):
       scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]{def
       dropRight(n: Int): scala.collection.immutable.Seq[Nothing] with
       scala.collection.AbstractSeq[Nothing]; def takeRight(n: Int):
       scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]; def drop(n:
       Int): scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]; def
       take(n: Int): scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing];
       def slice(from: Int,until: Int): scala.collection.immutable.Seq[Nothing] with
       scala.collection.AbstractSeq[Nothing]}; def splitAt(n: Int): (scala.collection.immutable.Seq[Nothing]
       with scala.collection.AbstractSeq[Nothing], scala.collection.immutable.Seq[Nothing] with
       scala.collection.AbstractSeq[Nothing])}; def takeRight(n: Int):
       scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]{def
       companion: scala.collection.generic.GenericCompanion[scala.collection.immutable.Seq with
       scala.collection.AbstractSeq]; def dropRight(n: Int): scala.collection.immutable.Seq[Nothing] with
       scala.collection.AbstractSeq[Nothing]{def dropRight(n: Int):
       scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]; def
       takeRight(n: Int): scala.collection.immutable.Seq[Nothing] with
       scala.collection.AbstractSeq[Nothing]; def drop(n: Int): scala.collection.immutable.Seq[Nothing]
       with scala.collection.AbstractSeq[Nothing]; def take(n: Int):
       scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]; def slice(from:
       Int,until: Int): scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]};
       def takeRight(n: Int): scala.collection.immutable.Seq[Nothing] with
       scala.collection.AbstractSeq[Nothing]{def dropRight(n: Int):
       scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]; def
       takeRight(n: Int): scala.collection.immutable.Seq[Nothing] with
       scala.collection.AbstractSeq[Nothing]; def drop(n: Int): scala.collection.immutable.Seq[Nothing]
       with scala.collection.AbstractSeq[Nothing]; def take(n: Int):
       scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]; def slice(from:
       Int,until: Int): scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]};
       def drop(n: Int): scala.collection.immutable.Seq[Nothing] with
       scala.collection.AbstractSeq[Nothing]{def dropRight(n: Int):
       scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]; def
       takeRight(n: Int): scala.collection.immutable.Seq[Nothing] with
       scala.collection.AbstractSeq[Nothing]; def drop(n: Int): scala.collection.immutable.Seq[Nothing]
       with scala.collection.AbstractSeq[Nothing]; def take(n: Int):
       scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]; def slice(from:
       Int,until: Int): scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]};
       def take(n: Int): scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]
       {def dropRight(n: Int): scala.collection.immutable.Seq[Nothing] with
       scala.collection.AbstractSeq[Nothing]; def takeRight(n: Int):
       scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]; def drop(n:
       Int): scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]; def
       take(n: Int): scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing];
       def slice(from: Int,until: Int): scala.collection.immutable.Seq[Nothing] with
       scala.collection.AbstractSeq[Nothing]}; def slice(from: Int,until: Int):
       scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]{def
       dropRight(n: Int): scala.collection.immutable.Seq[Nothing] with
       scala.collection.AbstractSeq[Nothing]; def takeRight(n: Int):
       scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]; def drop(n:
       Int): scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]; def
       take(n: Int): scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing];
       def slice(from: Int,until: Int): scala.collection.immutable.Seq[Nothing] with
       scala.collection.AbstractSeq[Nothing]}; def splitAt(n: Int): (scala.collection.immutable.Seq[Nothing]
       with scala.collection.AbstractSeq[Nothing], scala.collection.immutable.Seq[Nothing] with
       scala.collection.AbstractSeq[Nothing])}; def drop(n: Int): scala.collection.immutable.Seq[Nothing]
       with scala.collection.AbstractSeq[Nothing]{def companion:
       scala.collection.generic.GenericCompanion[scala.collection.immutable.Seq with
       scala.collection.AbstractSeq]; def dropRight(n: Int): scala.collection.immutable.Seq[Nothing] with
       scala.collection.AbstractSeq[Nothing]{def dropRight(n: Int):
       scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]; def
       takeRight(n: Int): scala.collection.immutable.Seq[Nothing] with
       scala.collection.AbstractSeq[Nothing]; def drop(n: Int): scala.collection.immutable.Seq[Nothing]
       with scala.collection.AbstractSeq[Nothing]; def take(n: Int):
       scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]; def slice(from:
       Int,until: Int): scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]};
       def takeRight(n: Int): scala.collection.immutable.Seq[Nothing] with
       scala.collection.AbstractSeq[Nothing]{def dropRight(n: Int):
       scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]; def
       takeRight(n: Int): scala.collection.immutable.Seq[Nothing] with
       scala.collection.AbstractSeq[Nothing]; def drop(n: Int): scala.collection.immutable.Seq[Nothing]
       with scala.collection.AbstractSeq[Nothing]; def take(n: Int):
       scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]; def slice(from:
       Int,until: Int): scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]};
       def drop(n: Int): scala.collection.immutable.Seq[Nothing] with
       scala.collection.AbstractSeq[Nothing]{def dropRight(n: Int):
       scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]; def
       takeRight(n: Int): scala.collection.immutable.Seq[Nothing] with
       scala.collection.AbstractSeq[Nothing]; def drop(n: Int): scala.collection.immutable.Seq[Nothing]
       with scala.collection.AbstractSeq[Nothing]; def take(n: Int):
       scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]; def slice(from:
       Int,until: Int): scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]};
       def take(n: Int): scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]
       {def dropRight(n: Int): scala.collection.immutable.Seq[Nothing] with
       scala.collection.AbstractSeq[Nothing]; def takeRight(n: Int):
       scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]; def drop(n:
       Int): scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]; def
       take(n: Int): scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing];
       def slice(from: Int,until: Int): scala.collection.immutable.Seq[Nothing] with
       scala.collection.AbstractSeq[Nothing]}; def slice(from: Int,until: Int):
       scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]{def
       dropRight(n: Int): scala.collection.immutable.Seq[Nothing] with
       scala.collection.AbstractSeq[Nothing]; def takeRight(n: Int):
       scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]; def drop(n:
       Int): scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]; def
       take(n: Int): scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing];
       def slice(from: Int,until: Int): scala.collection.immutable.Seq[Nothing] with
       scala.collection.AbstractSeq[Nothing]}; def splitAt(n: Int): (scala.collection.immutable.Seq[Nothing]
       with scala.collection.AbstractSeq[Nothing], scala.collection.immutable.Seq[Nothing] with
       scala.collection.AbstractSeq[Nothing])}; def take(n: Int): scala.collection.immutable.Seq[Nothing]
       with scala.collection.AbstractSeq[Nothing]{def companion:
       scala.collection.generic.GenericCompanion[scala.collection.immutable.Seq with
       scala.collection.AbstractSeq]; def dropRight(n: Int): scala.collection.immutable.Seq[Nothing] with
       scala.collection.AbstractSeq[Nothing]{def dropRight(n: Int):
       scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]; def
       takeRight(n: Int): scala.collection.immutable.Seq[Nothing] with
       scala.collection.AbstractSeq[Nothing]; def drop(n: Int): scala.collection.immutable.Seq[Nothing]
       with scala.collection.AbstractSeq[Nothing]; def take(n: Int):
       scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]; def slice(from:
       Int,until: Int): scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]};
       def takeRight(n: Int): scala.collection.immutable.Seq[Nothing] with
       scala.collection.AbstractSeq[Nothing]{def dropRight(n: Int):
       scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]; def
       takeRight(n: Int): scala.collection.immutable.Seq[Nothing] with
       scala.collection.AbstractSeq[Nothing]; def drop(n: Int): scala.collection.immutable.Seq[Nothing]
       with scala.collection.AbstractSeq[Nothing]; def take(n: Int):
       scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]; def slice(from:
       Int,until: Int): scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]};
       def drop(n: Int): scala.collection.immutable.Seq[Nothing] with
       scala.collection.AbstractSeq[Nothing]{def dropRight(n: Int):
       scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]; def
       takeRight(n: Int): scala.collection.immutable.Seq[Nothing] with
       scala.collection.AbstractSeq[Nothing]; def drop(n: Int): scala.collection.immutable.Seq[Nothing]
       with scala.collection.AbstractSeq[Nothing]; def take(n: Int):
       scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]; def slice(from:
       Int,until: Int): scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]};
       def take(n: Int): scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]
       {def dropRight(n: Int): scala.collection.immutable.Seq[Nothing] with
       scala.collection.AbstractSeq[Nothing]; def takeRight(n: Int):
       scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]; def drop(n:
       Int): scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]; def
       take(n: Int): scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing];
       def slice(from: Int,until: Int): scala.collection.immutable.Seq[Nothing] with
       scala.collection.AbstractSeq[Nothing]}; def slice(from: Int,until: Int):
       scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]{def
       dropRight(n: Int): scala.collection.immutable.Seq[Nothing] with
       scala.collection.AbstractSeq[Nothing]; def takeRight(n: Int):
       scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]; def drop(n:
       Int): scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]; def
       take(n: Int): scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing];
       def slice(from: Int,until: Int): scala.collection.immutable.Seq[Nothing] with
       scala.collection.AbstractSeq[Nothing]}; def splitAt(n: Int): (scala.collection.immutable.Seq[Nothing]
       with scala.collection.AbstractSeq[Nothing], scala.collection.immutable.Seq[Nothing] with
       scala.collection.AbstractSeq[Nothing])}; def slice(from: Int,until: Int):
       scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]{def
       companion: scala.collection.generic.GenericCompanion[scala.collection.immutable.Seq with
       scala.collection.AbstractSeq]; def dropRight(n: Int): scala.collection.immutable.Seq[Nothing] with
       scala.collection.AbstractSeq[Nothing]{def dropRight(n: Int):
       scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]; def
       takeRight(n: Int): scala.collection.immutable.Seq[Nothing] with
       scala.collection.AbstractSeq[Nothing]; def drop(n: Int): scala.collection.immutable.Seq[Nothing]
       with scala.collection.AbstractSeq[Nothing]; def take(n: Int):
       scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]; def slice(from:
       Int,until: Int): scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]};
       def takeRight(n: Int): scala.collection.immutable.Seq[Nothing] with
       scala.collection.AbstractSeq[Nothing]{def dropRight(n: Int):
       scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]; def
       takeRight(n: Int): scala.collection.immutable.Seq[Nothing] with
       scala.collection.AbstractSeq[Nothing]; def drop(n: Int): scala.collection.immutable.Seq[Nothing]
       with scala.collection.AbstractSeq[Nothing]; def take(n: Int):
       scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]; def slice(from:
       Int,until: Int): scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]};
       def drop(n: Int): scala.collection.immutable.Seq[Nothing] with
       scala.collection.AbstractSeq[Nothing]{def dropRight(n: Int):
       scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]; def
       takeRight(n: Int): scala.collection.immutable.Seq[Nothing] with
       scala.collection.AbstractSeq[Nothing]; def drop(n: Int): scala.collection.immutable.Seq[Nothing]
       with scala.collection.AbstractSeq[Nothing]; def take(n: Int):
       scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]; def slice(from:
       Int,until: Int): scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]};
       def take(n: Int): scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]
       {def dropRight(n: Int): scala.collection.immutable.Seq[Nothing] with
       scala.collection.AbstractSeq[Nothing]; def takeRight(n: Int):
       scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]; def drop(n:
       Int): scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]; def
       take(n: Int): scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing];
       def slice(from: Int,until: Int): scala.collection.immutable.Seq[Nothing] with
       scala.collection.AbstractSeq[Nothing]}; def slice(from: Int,until: Int):
       scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]{def
       dropRight(n: Int): scala.collection.immutable.Seq[Nothing] with
       scala.collection.AbstractSeq[Nothing]; def takeRight(n: Int):
       scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]; def drop(n:
       Int): scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]; def
       take(n: Int): scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing];
       def slice(from: Int,until: Int): scala.collection.immutable.Seq[Nothing] with
       scala.collection.AbstractSeq[Nothing]}; def splitAt(n: Int): (scala.collection.immutable.Seq[Nothing]
       with scala.collection.AbstractSeq[Nothing], scala.collection.immutable.Seq[Nothing] with
       scala.collection.AbstractSeq[Nothing])}; def splitAt(n: Int):
       (scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]{def
       dropRight(n: Int): scala.collection.immutable.Seq[Nothing] with
       scala.collection.AbstractSeq[Nothing]; def takeRight(n: Int):
       scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]; def drop(n:
       Int): scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]; def
       take(n: Int): scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing];
       def slice(from: Int,until: Int): scala.collection.immutable.Seq[Nothing] with
       scala.collection.AbstractSeq[Nothing]}, scala.collection.immutable.Seq[Nothing] with
       scala.collection.AbstractSeq[Nothing]{def dropRight(n: Int):
       scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]; def
       takeRight(n: Int): scala.collection.immutable.Seq[Nothing] with
       scala.collection.AbstractSeq[Nothing]; def drop(n: Int): scala.collection.immutable.Seq[Nothing]
       with scala.collection.AbstractSeq[Nothing]; def take(n: Int):
       scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]; def slice(from:
       Int,until: Int): scala.collection.immutable.Seq[Nothing] with
       scala.collection.AbstractSeq[Nothing]})}]
      

      Making List implement Serializable:

      List[scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing] with java.io.Serializable]
      

      While we are all aware of the issues around Serializable, I think in this case it is perfectly sound and safe to make List serializable:

      • List is not an interface, it is the base type of an ADT. Common behavior of its members should be reflected in the base type.
      • List is sealed, there is no chance of an user providing a new non-serializable subtype of List.

        Issue Links

          Activity

          Hide
          Jason Zaugg added a comment -

          It would be beneficial to link to the discussions on the mailing list that preceded the ticket.

          Show
          Jason Zaugg added a comment - It would be beneficial to link to the discussions on the mailing list that preceded the ticket.
          Show
          Adriaan Moors added a comment - https://groups.google.com/forum/?fromgroups=#!topic/scala-language/Do2ZU_szeLc
          Hide
          Adriaan Moors added a comment -

          I wouldn't say `List`'s lacking `Serializable` as a parent results in the huge lub, but rather that adding it makes the lub easier to express. Another shared parent would surely also have done the trick.

          Show
          Adriaan Moors added a comment - I wouldn't say `List`'s lacking `Serializable` as a parent results in the huge lub, but rather that adding it makes the lub easier to express. Another shared parent would surely also have done the trick.
          Hide
          Paul Phillips added a comment -

          Yes, however this observation has been very useful. Watch out, lub code. I'm coming.

          Show
          Paul Phillips added a comment - Yes, however this observation has been very useful. Watch out, lub code. I'm coming.
          Show
          Simon Ochsenreither added a comment - Merged in https://github.com/scala/scala/commit/44625e35a57b32c0417d29bbb075db64651516e5 .

            People

            • Assignee:
              Simon Ochsenreither
              Reporter:
              Simon Ochsenreither
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development