nidula 0.0.2 copy "nidula: ^0.0.2" to clipboard
nidula: ^0.0.2 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.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.
      • T and E types must extend Object (thus, non-null values are prohibited).
        • This enforces composition with Option types (Option<T>) instead of nullable types (T?).
      • Only T v and E e fields (and, thus, getters) are available.
        • value, val, err and error aliases were removed.
      • There is only a single public library to import components from.
      • Final modifiers to prevent extending Ok, Err, Some and None.
      • == operator takes all generic types into consideration when comparing Option objects and Result objects.
      • Added variable names to all function parameters in types
        • Callback autocomplete outputs e.g. (v) {} instead of (p0) {}
6
likes
0
pub points
5%
popularity

Publisher

verified publishermanuelplavsic.ch

A lightweight Dart library for Rust-like Option/Result types. Supports exhaustive pattern matching and compile-time safe, chainable None/Err propagation.

Repository (GitLab)
View/report issues

Topics

#option #result #pattern-matching #try-operator

License

unknown (license)

More

Packages that depend on nidula