Blog Post: Beating std::visit Without Really Trying
seb at wilzba.ch
Sat Oct 5 13:58:52 UTC 2019
On Saturday, 5 October 2019 at 06:40:35 UTC, Arun Chandrasekaran
> On Saturday, 5 October 2019 at 02:59:58 UTC, Paul Backus wrote:
>> I was curious how C++17's std::variant compared to the options
>> we have in D, like Algebraic and SumType, so I did a simple
>> comparison of the generated assembly for each of them. You can
>> read about it at the link below. And as you can probably guess
>> from the title, D comes out ahead, in the end.
>> This is my first attempt at sharing something like this, so
>> any comment or feedback is very much appreciated!
> Good one. Any plans to push SumType as a replacement of Phobo's
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.
More information about the Digitalmars-d-announce