std.sumtype?

Paul Backus snarwin at gmail.com
Thu Mar 18 16:48:01 UTC 2021


On Thursday, 18 March 2021 at 16:34:15 UTC, Oleg B wrote:
> On Thursday, 18 March 2021 at 16:11:06 UTC, Paul Backus wrote:
>> Something like this:
>>
>> alias QualifiedTypes = CopyTypeQualifiers!(typeof(val), 
>> val.Types);
>> auto tag = val.match!(v => staticIndexOf!(typeof(v), 
>> QualifiedTypes));
>
> why it is not in library? or why tag is private?

Because I personally haven't needed it for anything, and nobody 
else has presented me with a convincing use-case for it until now.

In general, it is much, much easier to add new features than to 
remove existing ones, so I try to put off adding a feature until 
I am absolutely sure it is the right decision.


More information about the Digitalmars-d mailing list