This is similar to scalaz' Validation structure:
https://github.com/scalaz/scalaz/blob/scalaz-seven/core/src/main/scala/scalaz/Validation.scala
One thing I noticed about Play's API is that it has a flatMap method.
The problem with providing this is it can't accumulate errors, as
demonstrated here:
Failure(Seq("Something", "went")) *> Failure(Seq("wrong"))
// Failure(Seq("Something", "went", "wrong"))
Failure(Seq("Something", "went")) flatMap { _ => Failure(Seq("wrong")) }
// Failure(Seq("Something", "went"))
So flatMap can silently ignore errors. Really not nice. This used to
be a problem in scalaz but it has been deprecated and will be deleted
in the next release.
On 23 January 2014 13:27, Will Sargent <[email protected]> wrote:
> Tweeted about this earlier, but figure langsec may be interested as a group:
>
> http://jto.github.io/articles/play_new_validation_api/
>
> Will.
>
> _______________________________________________
> langsec-discuss mailing list
> [email protected]
> https://mail.langsec.org/cgi-bin/mailman/listinfo/langsec-discuss
>
_______________________________________________
langsec-discuss mailing list
[email protected]
https://mail.langsec.org/cgi-bin/mailman/listinfo/langsec-discuss