Rob Dickens | 17 Jun 2012 12:58
Picon

Re: fixing Either

> As Paul suggested, that problem is fixed in Scala 2.10.

Sorry, still digesting that!

>> Regarding unbiased vs biased, if anyone could come up with an example
>> which required both returnsEither.rp AND returnsEither.lp, I'd be much
>> obliged. Otherwise, I'll assume that the use cases are so rare that we
>> might as well go biased.
>
> I don't understand the question. I agree with your suggestion to add new
> projections and deprecate the existing ones. I also suggest to add right
> biased methods directly to Either.

I'd been thinking (all along) that we should do one thing _or_ the
other. So you're suggesting we do both, eh?

Okay, well why not?!

We'd get the convenience of not having to append .rp (or .lp) and .e
all over the place in the vast majority of use-cases, while still
having them around for the rarer ones.

On Sun, Jun 17, 2012 at 11:23 AM, Jason Zaugg <jzaugg <at> gmail.com> wrote:
> On Sun, Jun 17, 2012 at 11:39 AM, Rob Dickens <robcdickens <at> gmail.com> wrote:
>> Well, I for one am convinced that Either shouldn't have a filter (or
>> withFilter). However, we still need to sort out the pattern-matching
>> business (which got raised along the way).
>
> As Paul suggested, that problem is fixed in Scala 2.10.
>
(Continue reading)

Rob Dickens | 18 Jun 2012 16:04
Picon

Re: fixing Either

Have just added a new branch to the project:

* Either now has both unbiased (via lp, rp) AND right-biased capability

* have added some pattern-matching tests (which, though far from
exhaustive, work fine)

* the pattern-matching requires Scala 2.10 (and therefore sbt 0.11.3).

This version looks to me like the SIP candidate - please take a look
and see if you agree:

https://github.com/robcd/scala-either-proj-map-returns-proj/tree/add_right-bias_2-10

Rob

On Sun, Jun 17, 2012 at 11:58 AM, Rob Dickens <robcdickens <at> gmail.com> wrote:
>> As Paul suggested, that problem is fixed in Scala 2.10.
>
> Sorry, still digesting that!
>
>>> Regarding unbiased vs biased, if anyone could come up with an example
>>> which required both returnsEither.rp AND returnsEither.lp, I'd be much
>>> obliged. Otherwise, I'll assume that the use cases are so rare that we
>>> might as well go biased.
>>
>> I don't understand the question. I agree with your suggestion to add new
>> projections and deprecate the existing ones. I also suggest to add right
>> biased methods directly to Either.
>
(Continue reading)


Gmane