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

From: Date: Wed, 06 Aug 2014 18:35:44 +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-76402@lists.php.net to get a copy of this message
On Wed, Aug 6, 2014 at 3:00 AM, Ferenc Kovacs <tyra3l@gmail.com> wrote: > I think dropping this behavior is a good idea, but I'm confused by the > reasoning related to the langspec. > This rfc targets php.next (which is a safe move as this has BC break albeit > would require some questionable code), but the langspec was agreed to be > based on 5.6 and document how that works. > Did we agree on that? The lang spec was originally written to 5.6 to have a relatively stable target, but (in my mind at least) was meant to track master as we move the language forward. Was there a discussion about branching the langspec repo for versions? Rowan Collins wrote: > According to the bug report, HHVM also accepts multiple default blocks, > but uses the first rather than the last. It's probably not worth implementing > specific code there to take the last default label just in order to adhere to > a 5.6 spec, but is worth making it detect multiple labels to bring it in line > with the proposed change. > Yeah, HHVM needs to be fixed as well, but I left that out of the scope of php-lang versions php-implementation issue. -Sara

« previous php.internals (#76402) next »