Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:109728 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 98480 invoked from network); 20 Apr 2020 19:48:48 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 20 Apr 2020 19:48:48 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 003C51804F6 for ; Mon, 20 Apr 2020 11:20:00 -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.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-yb1-f172.google.com (mail-yb1-f172.google.com [209.85.219.172]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Mon, 20 Apr 2020 11:19:59 -0700 (PDT) Received: by mail-yb1-f172.google.com with SMTP id l5so5947500ybf.5 for ; Mon, 20 Apr 2020 11:19:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=Vo1sDhgCfETkzsT7uSvgllTgQDHJX2D3+udON00TnQU=; b=OzsaFJs/I9ITy22s6OQ/n5Mwy3+1I1bAHL1IX3EpCtzgxdtpKFzuYgFiQx2d72q1sR kmAhn1erx84igmI/BGFm0TNB8eyiOk/3W16PfnHLydNEJPGeJqDxEkTLWTspf/ysr4VW lXcqKva/PIqFdXAAYIFfEJpfhFOlR7dExK6wVI2Hi2PpaEEwTXR22CcFxJAWN6lrLPzR YRQ7WI7+dORqq+dbfItpHIojHLW2s1IKLqyrt2ZBEM5wVhf4CxyD0Jge5OdqTc0wYJEE 2XYaY7UKLAaC9g+T5HJZrNdSRUv/sNDsyNugTxpUGPm7BcR7e5isPhr9fOuKVcjcgVdX rgnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=Vo1sDhgCfETkzsT7uSvgllTgQDHJX2D3+udON00TnQU=; b=JpZZvyIxC9j/ucbulfF3etNz0IAp5QPhiEPPRGiS2r2XvZBDMViJaPUI/Rl73EbHke /Lf1dCpKlgzvC0oUJ5zH0zBDAGY9FzFb58pxFpd6OC2XuV6328vX2Q9l8GH2EJSLRN05 oz0KzVZIN6e+W3icQgAMZ/aXHfK0H/DfiZpiH9+UjLoirEZ2Nuu+8MqUhNuM61rpM5iq Z9OR66wmdOCvAsK7H5UxnWNnQwdeEgOqD3qnLfxOfL7mYsUBiI8/SVPXW++HISdSbdUz hvv9vPqKkYBixe5xt7d87kSoDMbOjj0pTI1ltwdR16Ryoq4xArEZ6R4z2ss+wNLsFbhR vXPg== X-Gm-Message-State: AGi0PuaVbI57qL1To1goVnFFOBzr50fSrJU5pz1H9DqUJr6GGkAxjgUS lFnL8KtKLXH6+0tt4st7gcXESSOMHns57RBrQBuBeTvP X-Google-Smtp-Source: APiQypKKUrxZB6hV6GHW/SkeI0XYTGKePGODa/SHLwXx6s/+luYzTPR6YE/A609kRPGX1mAs2fO2Fn/ZXx3tzB/G9C0= X-Received: by 2002:a25:e08b:: with SMTP id x133mr21546263ybg.48.1587406796135; Mon, 20 Apr 2020 11:19:56 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Mon, 20 Apr 2020 20:19:44 +0200 Message-ID: To: PHP internals Content-Type: text/plain; charset="UTF-8" Subject: Re: [DISCUSSION] Match expression From: tovilo.ilija@gmail.com (Ilija Tovilo) Hi internals Just a heads up, I'd like to start the voting on the match expression RFC in a couple of days. https://wiki.php.net/rfc/match_expression I have made a number of changes to the RFC. * Block return values are now allowed but limited to match arms (https://wiki.php.net/rfc/match_expression#blocks) * Nikita and I have discussed this here: https://github.com/php/php-src/pull/5407 * continue targeting match is no longer allowed (compilation error) (https://wiki.php.net/rfc/match_expression#breakcontinue) * Minor rewording The jury is still out on: * Optional semicolon when using match as a statement (https://wiki.php.net/rfc/match_expression#semicolon) * It makes the grammar somewhat complicated * Nesting match expression blocks without parentheses aren't possible (https://github.com/php/php-src/pull/5407#issuecomment-616612763) * Compilation error when not returning a value from a block (https://wiki.php.net/rfc/match_expression#blocks) * When the block terminates (e.g. through throw or exit) no return value is needed but the current implementation requires it * We could make this a runtime error instead If you have anything new to add to the discussion, this is your chance! Ilija