Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:76372 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 30614 invoked from network); 6 Aug 2014 09:59:59 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Aug 2014 09:59:59 -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.192.48 as permitted sender) X-PHP-List-Original-Sender: tyra3l@gmail.com X-Host-Fingerprint: 209.85.192.48 mail-qg0-f48.google.com Received: from [209.85.192.48] ([209.85.192.48:56116] helo=mail-qg0-f48.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id BA/72-13038-E9CF1E35 for ; Wed, 06 Aug 2014 05:59:58 -0400 Received: by mail-qg0-f48.google.com with SMTP id i50so2370314qgf.7 for ; Wed, 06 Aug 2014 03:00:26 -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=WtkovdTSF5ReDcLMYRpAe3r2wSMWNV2I56fX1S0c4T4=; b=jLUSa74KVFGc4PnuOh+q3sIvNu24JEK77VCsNcpFFGhHTclZvyX5A+Ea7sEFSt6o4u v21SOzByu16ClVv2WxL9KwZCdoEJQNEY2Lu+1L5m+wkMetjU5BA7mf4YhKWQu6+mQWGH N0TNzdHbJm/+tERjInK+AZM7pBYUpwL0OaOHtL6i94cfz5fGku5wTdsKDkHoipw9hKzd PIA8Bbq06XB54zBh6h84JG7vpqWXTR7PmtwR7zZC8piVePseR4B1GEQYoaHNJHPva65E qddqki9RYanz4JXNEflJPU9F5qFMcX3Mfuvd0L5fxo05xalsuJOU8wLiqvfh2tjw89zs 3kPw== MIME-Version: 1.0 X-Received: by 10.224.11.9 with SMTP id r9mr15007382qar.43.1407319226026; Wed, 06 Aug 2014 03:00:26 -0700 (PDT) Received: by 10.140.102.111 with HTTP; Wed, 6 Aug 2014 03:00:25 -0700 (PDT) In-Reply-To: References: Date: Wed, 6 Aug 2014 12:00:25 +0200 Message-ID: To: Sara Golemon Cc: PHP internals Content-Type: multipart/alternative; boundary=001a11c2c7a28d924e04fff30ab9 Subject: Re: [PHP-DEV] [RFC] Disallow multiple default blocks in a single switch statement From: tyra3l@gmail.com (Ferenc Kovacs) --001a11c2c7a28d924e04fff30ab9 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 it: > > switch ($expr) { > default: > notExecuted(); > break; > default: > executed(); > } > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > Hi, 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. So even if we accept this rfc, and remove the multiple default case, wouldn't we still need to document the current behavior in the spec (maybe mentioning that it will go away in php-net)? --=20 Ferenc Kov=C3=A1cs @Tyr43l - http://tyrael.hu --001a11c2c7a28d924e04fff30ab9--