Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:76464 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 95404 invoked from network); 13 Aug 2014 08:47:58 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Aug 2014 08:47:58 -0000 Authentication-Results: pb1.pair.com smtp.mail=tyra3l@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=tyra3l@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.175 as permitted sender) X-PHP-List-Original-Sender: tyra3l@gmail.com X-Host-Fingerprint: 209.85.216.175 mail-qc0-f175.google.com Received: from [209.85.216.175] ([209.85.216.175:34114] helo=mail-qc0-f175.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F1/23-00877-C362BE35 for ; Wed, 13 Aug 2014 04:47:56 -0400 Received: by mail-qc0-f175.google.com with SMTP id w7so3829678qcr.34 for ; Wed, 13 Aug 2014 01:48:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=jF4ZB99CupTduLGmpgqgDWtj3KrH6LcmajUxeLZLUK0=; b=dIHiXTETEqK/5iGOfiQv7waQYxgRhRQfiJhUYozT5YtQ6ULcGDoIoc80EK1EVLyj2N Oemwj21sURjnqQ13HCdIvzeyKvCYVfXy1RGYz79lt9fPc3arkEq7auw2rHnfCJQn8UbP MqcjRULrgwxmiUbFEi7VTdDUhA9UDKNagBrXtcpLbtMubWFreuNfpf1BtYCjc849YUDi w+jjlg+FtKgdu0Qa5pfjPOycMqsA+bmlO7/eWP3pEuwUZJJ3x30VmvqrrWagLyCLZGJ8 5Xjv3rqtzX4wo5QZX/AIldXYLNIY38iyWVOvQcgKpzE5vykttKz3BoJp7NK8Cj7qDUPe 3t1g== MIME-Version: 1.0 X-Received: by 10.224.75.130 with SMTP id y2mr4506520qaj.72.1407919717725; Wed, 13 Aug 2014 01:48:37 -0700 (PDT) Received: by 10.140.102.111 with HTTP; Wed, 13 Aug 2014 01:48:37 -0700 (PDT) In-Reply-To: References: Date: Wed, 13 Aug 2014 10:48:37 +0200 Message-ID: To: Pierre Joye Cc: Sara Golemon , PHP internals Content-Type: multipart/alternative; boundary=001a11c2ef7ea5c0e505007edaab Subject: Re: [PHP-DEV] [RFC] Disallow multiple default blocks in a single switch statement From: tyra3l@gmail.com (Ferenc Kovacs) --001a11c2ef7ea5c0e505007edaab Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Wed, Aug 13, 2014 at 10:38 AM, Pierre Joye wrote: > On Wed, Aug 13, 2014 at 9:47 AM, Ferenc Kovacs wrote: > > On Wed, Aug 6, 2014 at 6:38 AM, Sara Golemon wrote: > > > >> https://wiki.php.net/rfc/switch.default.multiple > >> > >> 'Cause this code is silly (even if it had case blocks), but we allow i= t: > >> > >> switch ($expr) { > >> default: > >> notExecuted(); > >> break; > >> default: > >> executed(); > >> } > >> > >> -- > >> PHP Internals - PHP Runtime Development Mailing List > >> To unsubscribe, visit: http://www.php.net/unsub.php > >> > >> > > Hi, > > > > sorry to jump in this late, but I'm not sure that it is a good idea to > only > > reject the multiple default blocks but keep the ability to have the sam= e > > case multiple times: > > http://3v4l.org/eZdPU > > in this regard I think the current status is more consistent as it woul= d > > after merging this patch. > > 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 to= o > > many people, and they will be clearly notified about the error at compi= le > > time) so I voted no based on this two thing. > > I have a mixed feeling too about doing this change in 5.x. Without > nitpicking, it is still a BC break. I also think that making PHP > somehow consistent, less confusing, etc. while working on the PHP > specs, we should really target php7 for any of these changes. > > As of the discussions about the discussion phase, what is one week > more anyway? Especially in summer when the lucky ones are in holidays? > ;) > > after re-reading my email, I realized that instead of "and I also think that this isn't an important enough issue to warrant a BC break" I wanted to say that and I also think that this isn't an important enough issue to warrant a BC break in a minor version --=20 Ferenc Kov=C3=A1cs @Tyr43l - http://tyrael.hu --001a11c2ef7ea5c0e505007edaab--