zajrik / option_result

A lightweight Dart library for Rust-like Option/Result types and associated pattern matching
https://pub.dev/packages/option_result
MIT License
12 stars 1 forks source link

Missing mention of fpdart, although you include dartz #1

Closed RandalSchwartz closed 1 year ago

RandalSchwartz commented 1 year ago

Dartz is long dead. fpdart is pretty broadly implemented and thoroughly documented, and will embrace Dart 3 once the beta version lands. I'm wondering what you think your package brings that you couldn't have just used a part of fpdart?

zajrik commented 1 year ago

Honestly just an oversight. I've never actually used any of the packages mentioned in the readme, I just felt they were worth mentioning because they provide something similar.

What I hoped to get out of writing this package was as close to a 1:1 experience of Rust's Option/Result types and support for Dart 3's exhaustive pattern matching with sealed types, which none of the packages I explored when I needed this functionality provided at the time of starting the project. And looking at fpdart, it does not appear to yet either.

That said, you're absolutely correct. fpdart is absolutely worth a mention. I'll update the readme and make note of dartz being apparently abandoned.

zajrik commented 1 year ago

Fixed in 012c5a5a70ea36325a7392e9c24158eed3436eef.

RandalSchwartz commented 1 year ago

fpdart's 1.0 release (now in beta) supports a sealed version of Option and Either for exhaustive pattern matching, and embraces records, rather than using tuples.