sumtype 0.8.3
Simen Kjærås
simen.kjaras at gmail.com
Tue Feb 26 13:19:51 UTC 2019
On Tuesday, 26 February 2019 at 12:52:11 UTC, JN wrote:
> On Monday, 25 February 2019 at 20:31:43 UTC, Paul Backus wrote:
>> SumType is a generic sum type for modern D. It is meant as an
>> alternative to
>> `std.variant.Algebraic`.
>
> Is it a better alternative? Seems like it from the description.
> If it's objectively better on all fronts, perhaps it should be
> considered for inclusion into Phobos, as a replacement for the
> existing Algebraic?
It's not a perfect superset of Algebraic and Variant in Phobos,
so it's not a strictly better alternative. The feature that is
missing is SumType can't hold arbitrary types, only the types
specified in its template parameters. However, for the case where
the set of possible types is limited, it's strictly better.
--
Simen
More information about the Digitalmars-d-announce
mailing list