C++ pattern matching is coming
IGotD-
nise at nise.com
Sun Oct 23 10:43:40 UTC 2022
On Sunday, 23 October 2022 at 00:12:32 UTC, ryuukk_ wrote:
>
> One issue with C++'s take is they will reserve 2 more keywords
> (choice, match), i think it is a huge mistake, enum and switch
> should have been reused imo
>
Can they reuse switch? In Swift they have pattern matching but
they use the switch keyword for their jack-of-all-trades switch
statement. Problem with C++ (and D) is that the switch statement
is fallthrough by default. In order to fix this historical
mistake they need a complete new keyword.
This is something to fix in D3, remove fallthrogh by default.
More information about the Digitalmars-d
mailing list