C++ pattern matching is coming

ryuukk_ ryuukk.dev at gmail.com
Fri Oct 28 12:36:48 UTC 2022


On Friday, 28 October 2022 at 12:34:42 UTC, ryuukk_ wrote:
> 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?

Only with D the solution is a template, then your program takes 
30 seconds to compile and people wonder why it is slow, don't put 
the burden on the users for something this essential, it doesn't 
look good


More information about the Digitalmars-d mailing list