Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:109922 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 3564 invoked from network); 29 Apr 2020 15:00:13 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 29 Apr 2020 15:00:13 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 893EC1804E2 for ; Wed, 29 Apr 2020 06:33:39 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_NONE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS11403 66.111.4.0/24 X-Spam-Virus: No X-Envelope-From: Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Wed, 29 Apr 2020 06:33:38 -0700 (PDT) Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 485B65C02DA for ; Wed, 29 Apr 2020 09:33:38 -0400 (EDT) Received: from imap26 ([10.202.2.76]) by compute7.internal (MEProxy); Wed, 29 Apr 2020 09:33:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=+GXal6 AIe+SL7wVcnbLr0hwFJ0ATijlGtaeZ4AY6nQA=; b=Dz0cRrE8HZlwU8fEoOV+tv FZz6ZTakVxF6Vt552nIoSD6iXEED18YXqiNb8AYSvjuqZvMu2JekXXIxxcGzvL4R pSQ9oKvKtJw1lHUglJh8q1VfI93UEiiCq4ThSSl5gvsVDdmRt98hg9QS6R7SnVi7 kpMqE5aUl2PzAZ/C7Z5WvzdC2wJTP0XpesmRP+HgJJZNTof0Tl80lC4Nxv0nqNHE KO2rR+vnV7m+l4DYW5N4igvLO8Yoq41+uq9O4l7FYG/TVLgG+0Tt6dLNwifBTpfb MMxcHk5YZNrSPY6WVomxvevB4Vdcot9lBO4gBrVbp2kGKWYRDDUL1/N6eAFADoUw == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrieefgdeihecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefofgggkfgjfhffhffvufgtsehttdertderredtnecuhfhrohhmpedfnfgrrhhr hicuifgrrhhfihgvlhgufdcuoehlrghrrhihsehgrghrfhhivghlughtvggthhdrtghomh eqnecuggftrfgrthhtvghrnhepudekffdujefftdekhffgiedthffhgeelgfeigfdtudef veeukeehiedvtdduteeknecuffhomhgrihhnpehgrhgvphdrrghpphenucevlhhushhtvg hrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehlrghrrhihsehgrghrfhhi vghlughtvggthhdrtghomh X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id CB8FB14200A2; Wed, 29 Apr 2020 09:33:37 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.3.0-dev0-351-g9981f4f-fmstable-20200421v1 Mime-Version: 1.0 Message-ID: <890de1e6-6f71-45e7-8001-ebf4cb164992@www.fastmail.com> In-Reply-To: References: <5ea6e4b0.1c69fb81.cf3ee.2bbfSMTPIN_ADDED_MISSING@mx.google.com> <969c6150-a084-48c0-ae8f-b8043dce321d@www.fastmail.com> Date: Wed, 29 Apr 2020 08:33:16 -0500 To: "php internals" Content-Type: text/plain Subject: Re: [PHP-DEV] [VOTE] match expression From: larry@garfieldtech.com ("Larry Garfield") On Wed, Apr 29, 2020, at 1:41 AM, Ilija Tovilo wrote: > > Or for that matter... is anyone actually using that syntax in the wild, or is it hypothetical? > > It's quite common in C (you can't declare variables directly in a > switch case) so I'd guess it would be used at least by some people in > PHP. > > The worst part is that your code wouldn't throw, it would just start > behaving differently. > > Looking at grep.app you'll find quite a few of them. > https://grep.app/search?q=%3A%20%7B&filter[lang][0]=PHP > (Note that searching with regex won't work as that only shows a very > small subset of results.) > > Ilija Well, poopy. I still think splitting the RFC in half (rust-style match and Go-style switch) is the correct way forward, whatever the syntax particulars. --Larry Garfield