SumType in Phobos?

Mathias Lang pro.mathias.lang at gmail.com
Thu Feb 20 17:09:09 UTC 2020


On Thursday, 20 February 2020 at 16:08:43 UTC, Per Nordlöw wrote:
> On Wednesday, 19 February 2020 at 06:52:04 UTC, Ernesto 
> Castellotti wrote:
>> How about including SumType 
>> (https://github.com/pbackus/sumtype) in Phobos?
>>
>> We know that std.variant.Algebraic has problems (nogc, nothrow 
>> etc), SumType would be a wonderful solution to provide a tagged
>
> I also have an alternative to std.variant.Algebraic at
>
> https://github.com/nordlow/phobos-next/blob/master/src/nxt/variant.d
>
> which is @safe pure nothrow @nogc when possible and doesn't 
> rely on TypeInfo. No explicit support for @BetterC.

Fairly sad how common of a need it is: 
https://github.com/Geod24/minivariant#minivariant-simple-focused-variant-library


More information about the Digitalmars-d mailing list