@dibblego What do you think about inferring union types instead of Any&friends?
-
-
@dibblego scala.util.Either/Left/Right vs. exposing the common subset of methods shared by all types participating in the union type.Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
@dibblego E. g. (x: String|Int).toString OK, (x: String, Int).length NOT OK. Pattern matching would work on String/Int, not Left/Right, etc.Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
@dibblego In that sense union types don't have any effect on which methods are allowed to be called at runtime but allow more precise types. -
@oxnrtr Same as Either. Do not use scala.Either as the example. - Show replies
New conversation -
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.