Hi @propensive. Do you use Option#getOrElse? Or do you consider it bad practice? If so, why/why not? Thanks
@Gentmen I've just found myself writing just such a pattern match, though! Sometimes better to be explicit, and map/getOrElse aren't always.
-
-
@propensive ah! unless using explicit types, can `getOrElse[B >: A](default: ⇒ B): B` result in a different type too than "intended" w/ `B`? -
@Gentmen The result will be the LUB of A and B, so you can easily end up with `Any` if the types are unrelated... Make sense?
End of conversation
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.