Blog Post: Beating std::visit Without Really Trying
Paul Backus
snarwin at gmail.com
Sat Oct 5 15:51:40 UTC 2019
On Saturday, 5 October 2019 at 13:58:52 UTC, Seb wrote:
> On Saturday, 5 October 2019 at 06:40:35 UTC, Arun
> Chandrasekaran wrote:
>> Good one. Any plans to push SumType as a replacement of
>> Phobo's Algebraic?
>
> Phobos is essentially dead/frozen (feature-wise). Though if
> someone ever manages to get v2 of the ground, SumType would be
> the obvious choice.
>
> Anyhow, currently we would have to name it differently (e.g.
> dts - https://github.com/wilzbach/dts). Maybe the upcoming SAoC
> project will change this and allow multiple versions of a
> library to co-exist in a binary.
I actually would like to submit SumType to Phobos, albeit as an
alternative to Algebraic rather than a replacement for it. Given
how dramatic the improvement is, I think it's worth the
awkwardness of having two sum type implementations in the
standard library.
Currently, the main thing blocking me is bugzilla issue #19458
[1], which (for somewhat complicated reasons [2]) makes it
impossible for SumType to support members with @disabled and
non-const opEquals overloads.
[1] https://issues.dlang.org/show_bug.cgi?id=19458
[2] https://github.com/pbackus/sumtype/issues/16
More information about the Digitalmars-d-announce
mailing list