Do you know if this is still on cards?
enum List[+T] { case Nil; case ::(head: T, tail: List[T]) } vs sealed trait List[+T] case object Nil extends List[T] case class ::[T](hea...
-
-
Sorry if I am hijacking the discussion, but if there is still room for change, may I request that we do it the Swift way?
-
I'm not familiar with Swift, but my guess is that it wouldn't be an exact fit for Scala and the amendments would result in different issues.
- Show replies
New conversation -
-
-
Now implement one of List's methods. I'll wait.
-
implicit class ListMethods[+T](list: List[T]) { ... } But I think that's the point: an "enum" is closer to a pure ADT.
- Show replies
New conversation -
-
-
I think that's proving the point on verbosity. Without the creative formatting it saved "extends List[T]" using syntax that barely works IRL
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.