C++ Logo

std-proposals

Advanced search

Re: [std-proposals] A draft for modern switch

From: Jason McKesson <jmckesson_at_[hidden]>
Date: Tue, 20 May 2025 11:57:00 -0400
On Tue, May 20, 2025 at 11:36 AM Filip <fph2137_at_[hidden]> wrote:
>
> > `switch` should not be looked on as something that has a future.
>
> Maybe just a preference but I’d like to use switch instead of some new construct. Seems like an easy thing to do.

I'm talking more about standardization. If there's some new
functionality that the language needs which fits the general style of
`switch` statements, it should go into pattern-matching, not `switch`.
We shouldn't attempt to upgrade `switch` with new stuff.

Individual programmers can keep using it. But the standard shouldn't
treat it like it's something that needs improvement.

Received on 2025-05-20 15:57:13