Pattern matching: Callback For Matching Type

Daniel N no at public.email
Wed May 29 18:33:24 UTC 2024


On Wednesday, 29 May 2024 at 18:24:19 UTC, Richard (Rikki) Andrew 
Cattermole wrote:
> ```d
> alias MTU = MyTaggedUnion!(int, float, string);
>
> MTU mtu = MTU(1.5);
>
> mtu.match {
> 	(float v) => writeln("a float! ", v),
> 	v => writeln("catch all! ", v)
> };
> ```

why not
(auto v)
for syntax consistency?



More information about the dip.ideas mailing list