cbyad / either_option Goto Github PK
View Code? Open in Web Editor NEWA small typed and safe library for error handling with functionnal programming concept in Dart and flutter project
License: MIT License
A small typed and safe library for error handling with functionnal programming concept in Dart and flutter project
License: MIT License
Hi, is there a reason to not mark null-safety version as stable?
p.s. Thanks for your work, I'm using your package everywhere...
It seems the package does not support NNBD and has no branch for it. Can I make a PR?
Foreigners who doesn't know background of the names may try finding constructors from Either
and Option
.
Either
and Option
is closed class, and inseparable from the derived types. I think this is adoptable and can help beginners.
Some useful combinators could be added:
One of the breaking changes of adopting null safety is the following.
final n = Some(3);
// pass
n.fold(() => null, (x) => x);
// can't pass
n.getOrElse(null);
Current getOrElse
implementation is this.
A getOrElse(A caseElse) => fold(() => caseElse, (A a) => a);
I couldn't find the signature accepting n.getOrElse(null)
. It can be bypassed by using fold
directly so it doesn't require an immediate action, but it can be a consideration point.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.