Re: [RFC] Disallow multiple default blocks in a single switch statement

From: Date: Wed, 13 Aug 2014 09:42:30 +0000
Subject: Re: [RFC] Disallow multiple default blocks in a single switch statement
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-76467@lists.php.net to get a copy of this message
Hi! On 13 Aug 2014, at 08:47, Ferenc Kovacs <tyra3l@gmail.com> wrote: > and I also think that this isn't an important enough issue to warrant a BC > break (albeit this is the better kind of BC: probably doesn't effect too > many people, and they will be clearly notified about the error at compile > time) so I voted no based on this two thing. This isn’t really a BC break. Multiple default blocks didn’t actually work anyway, we just silently ignored extra ones. On 13 Aug 2014, at 09:13, James <james@notjam.es> wrote: > I entirely believe this behavior is weird and should be removed. However, > breaking backwards > compatibility in a minor release because the incomplete spec says so is > kind of odd. A BC break > is a BC break, which doesn't belong in a minor revision. It isn’t a BC break that will affect anyone. It fixes a parser bug. > This has been known to at least one person for many years if 034.phpt is to > be believed. Just because it’s tested doesn’t mean anyone relies on it. We have plenty of tests which ensure PHP contains bugs and will error if they don’t. > I could see > where people would use it - there are reasons to, even if they are poor in > choice to do so. How, exactly, could there ever be a use for having multiple default: sections and ignoring all but one? This “feature” is completely and utterly useless, and I’ll eat my hat if anyone intentionally relied on it. Thanks!! -- Andrea Faulds http://ajf.me/

« previous php.internals (#76467) next »