snarwin at gmail.com
Sun Nov 15 20:05:16 UTC 2020
SumType is a generic discriminated union type for modern D. It is
be an improved alternative to `std.variant.Algebraic`.
- Pattern matching, including:
- Match-by-introspection ("if it compiles, it matches") (★)
- Multiple dispatch (★)
- Support for self-referential types (`This`).
- Works with `pure`, `@safe`, `@nogc`, `nothrow`, and
- Compatible with `-betterC` and `-dip1000` (★)
- Zero runtime overhead compared to hand-written C
- No heap allocation
- Does not rely on runtime type information (`TypeInfo`) (★)
Starred features (★) are those that are missing from `Algebraic`.
With this release, SumType's public API is officially considered
breaking API changes will be made from this release forward
without a major
Improvements since 0.10.0, the last announced version:
- Copy constructors of SumType members are now called correctly.
- Self-referential SumTypes can now contain self-referential
- SumType is now tested on Windows in addition to Linux and Mac
- Documentation: https://pbackus.github.io/sumtype/sumtype.html
- DUB: https://code.dlang.org/packages/sumtype
- Github: https://github.com/pbackus/sumtype
More information about the Digitalmars-d-announce