nidula 0.1.0
nidula: ^0.1.0 copied to clipboard
A lightweight Dart library for Rust-like Option/Result types. Supports exhaustive pattern matching and compile-time safe, chainable None/Err propagation.
0.1.0 #
- Renamed most classes and methods and static methods. Names are longer, but much more obvious:
propwas renamed tounwrapOrPropagateErrandunwrapOrPropagateNone.catchProp/catchPropAsyncwere renamed tosyncErrPropagationScope/asyncErrPropagationScopeandsyncNonePropagationScope/asyncNonePropagationScope.ResultPropErrorwas renamed toErrPropagation. Same forOptionPropError, which was renamed toNonePropagation.ResultPropTokenwas renamed toErrPropagationToken. Same forOptionPropToken, which was renamed toNonePropagationToken.
- Added
Propagationabstract class. - Improved and refactored tests.
- Improved docstring.
- Improved README.
0.0.3 #
- Add try-catch warning to README.
- Add more code to
nidula_example.dart. - Small fix to example in README.
0.0.2 #
- Upload again to fix repository URL detection.
0.0.1 #
- Initial version.
- Forked from
option_result, bringing the following enhancements:- Try-operator implementation rewritten from scratch.
- Compile time safety through propagation tokens.
- Chainable.
- Simpler and clearer library-internal error handling strategy.
TandEtypes must extendObject(thus, non-null values are prohibited).- This enforces composition with
Optiontypes (Option<T>) instead of nullable types (T?).
- This enforces composition with
- Only
T vandE efields (and, thus, getters) are available.value,val,erranderroraliases were removed.
- There is only a single public library to import components from.
- Final modifiers to prevent extending
Ok,Err,SomeandNone. ==operator takes all generic types into consideration when comparingOptionobjects andResultobjects.- Added variable names to all function parameters in types
- Callback autocomplete outputs e.g.
(v) {}instead of(p0) {}
- Callback autocomplete outputs e.g.
- Try-operator implementation rewritten from scratch.
- Forked from