draft proposal for Sum Types for D
Zealot
no2 at no.no
Wed Nov 30 13:44:48 UTC 2022
On Wednesday, 30 November 2022 at 08:49:00 UTC, Andrey Zherikov
wrote:
> On Tuesday, 29 November 2022 at 06:26:20 UTC, Walter Bright
> wrote:
>> [...]
>
>> [...]
>
> It does:
> ```d
> SumType!(int, string) s;
> s.match!((int i) => true); // Error: static assert: "No
> matching handler for types `(string)`"
> ```
>
> [...]
+1
this would actually reduce a lot of clutter.
More information about the Digitalmars-d
mailing list