Re: Failure should probably extend Try[Nothing], as shown in first lecture of Principles of Reactive Programming
Rich Dougherty <[email protected]>
| Newsgroups | gmane.comp.lang.scala |
|---|---|
| Message-ID | <CABW6spPZR3U1OfE_HkdC_5yZkXrn_mP_+J7D1VeqRRsrbt+Juw@mail.gmail.com> |
There doesn't seem to be much that can be done about the issue without causing compatibility problems, but here's the issue I created last year: https://issues.scala-lang.org/browse/SI-8566 Rex, for your 3 cases there's a good analogy with Option: None is an Option[Nothing], but if I want a None that's an Option[A] I'll often use Option.empty[A]. In a similar way you could have Failure as a Try[Nothing] and a method Try.failure[A] that returns a Failure as a Try[A]. – Rich On Wed, May 13, 2015 at 5:19 AM, Viktor Klang <[email protected]> wrote: > Hi Christoph, > > The only reason this hasn't been done before is due to backwards > compatibility. > -- Rich Dougherty *Engineer, Typesafe, Inc* @richdougherty <https://twitter.com/richdougherty> -- You received this message because you are subscribed to the Google Groups "scala-language" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.