C++ pattern matching is coming

ryuukk_ ryuukk.dev at gmail.com
Fri Oct 28 12:34:42 UTC 2022


On Friday, 28 October 2022 at 09:35:06 UTC, Sergey wrote:
> On Thursday, 27 October 2022 at 15:14:30 UTC, ryuukk_ wrote:
>> PHP also got builtin sumtype and pattern matching
>>
>> https://laravel-news.com/modern-php-features-explained
>>
>> https://news.ycombinator.com/item?id=33357318
>>
>>
>> D lagging behind most languages now :/
>
> D also has them: https://dlang.org/phobos/std_sumtype.html#match

std.sumtype is buggy, it's slow and it is a template

C/C++ also had them with MACROs, why do you think they decided to 
now have them has built in feature?



More information about the Digitalmars-d mailing list