FSharpx.Extras icon indicating copy to clipboard operation
FSharpx.Extras copied to clipboard

It's a bit confusing that Validation uses Choice instead of Result

Open Tarmil opened this issue 3 years ago • 3 comments

I understand that it's because this library is older than the inclusion of the Result type in FSharp.Core. But maybe it would be worth adding a separate Result-based validation module? Maybe even ultimately obsoleting the current Choice-based one.

Tarmil avatar Dec 04 '22 12:12 Tarmil

I totally agree with that! Let's add a Result-based validation module and deprecated the Choice. In the next major version we can obsolete it. Should I do it or leave it for you?

gdziadkiewicz avatar Dec 08 '22 10:12 gdziadkiewicz

I can work on it.

I'm not sure what the new module should be called though. Validate? Validator? Or maybe still Validation but located in a sub-namespace to avoid collision?

Tarmil avatar Dec 09 '22 14:12 Tarmil

I like the idea of Validation located in a sub-namespace. With such approach I would be able to simply switch to new implementation by change the open in my code and fixing compiler errors.

gdziadkiewicz avatar Dec 11 '22 21:12 gdziadkiewicz