Re: Adding explicit intent for SWITCH/CASE fall through?

From: Date: Sat, 19 Oct 2019 07:21:57 +0000
Subject: Re: Adding explicit intent for SWITCH/CASE fall through?
References: 1 2 3 4 5 6  Groups: php.internals 
Request: Send a blank email to internals+get-107579@lists.php.net to get a copy of this message
On Sat, Oct 19, 2019 at 12:06 AM A.L.E.C <alec@alec.pl> wrote: > On 10/18/19 8:57 PM, Mike Schinkel wrote: > > Imo, this would make more sense if fallthrough did something more, e.g. > allowing > > case X: > if (something) { > fallthrough; > } > something-else; > break; > case Y: .... > > +1 If we're going to do this, let's take the opportunity to make it even more useful. I love the idea of being able to explicitly define fallthrough points in a case. I agree that "continue" is the logically ideal solution, but the BC breakage negates that. So I'd have to go with "next", as it's both concise and descriptive. --Kris

« previous php.internals (#107579) next »