Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:76477 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 24779 invoked from network); 13 Aug 2014 12:26:45 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Aug 2014 12:26:45 -0000 Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.172 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 209.85.212.172 mail-wi0-f172.google.com Received: from [209.85.212.172] ([209.85.212.172:48900] helo=mail-wi0-f172.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 29/32-11625-4895BE35 for ; Wed, 13 Aug 2014 08:26:45 -0400 Received: by mail-wi0-f172.google.com with SMTP id n3so7301512wiv.11 for ; Wed, 13 Aug 2014 05:27:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=n6rTSeNRjtuYd1kuXjHdRhCUVPqBmWgb4XUytCrAtiU=; b=cWKnRceKfkHU3Baa80OPIZBt6v+x0SPnsmpeIWpGBpF2gr2EthjTwnPe3em6lOjTnD rMvE/GhVSqxcDu9Ans0BDEHB+k5GLyCjhPCB0MrkQ4lLd5SxWSKa8yHVvOlpikWaQjpE Ih98wbwKP6GiSJIz9lxxBS7piX8p6lIr6fOjZBgaH3tgmGOrtUcArK/7PdzIIbhxXqLB pxvNMIbQGWb3GH7bMYkwl92QuldqCTb+L56QAjZg+BxAGvHOLRp836sZR7j5QSJMe2Rz wZZG3hMD95ReNwCDfM/9UnqLExF8EJWPT0DkmOgc03jjsEiVNDZVPEIQ9QHD3bIszCf1 NGeA== X-Received: by 10.180.95.135 with SMTP id dk7mr38230525wib.68.1407932847185; Wed, 13 Aug 2014 05:27:27 -0700 (PDT) Received: from [192.168.0.177] ([62.189.198.114]) by mx.google.com with ESMTPSA id fs3sm7936040wic.20.2014.08.13.05.27.26 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 13 Aug 2014 05:27:26 -0700 (PDT) Message-ID: <53EB59AD.6020100@gmail.com> Date: Wed, 13 Aug 2014 13:27:25 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: PHP Internals References: <53EB3C6A.5010106@gmail.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC] Disallow multiple default blocks in a single switch statement From: rowan.collins@gmail.com (Rowan Collins) Ferenc Kovacs wrote (on 13/08/2014): > agree, and I thought about mentioning that, but I left that out, > because I'm not proposing to remove that ability (and I see more > use-cases for that as mentioned in my previous email) but stating that > this patch would make an arbitrary distinction between the normal and > the default cases. I'm not sure I agree that it's arbitrary. Having a switch with two "default" clauses is like having an if with two "else" clauses; specifying two case labels which can be true at the same time is like having two "elseif" clauses chained together that can both be true at the same time. One is clearly an error; the other is just poorly written logic, and you can't make the parser outlaw every instance of poor logic. -- Rowan Collins [IMSoP]