Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:109842 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 41317 invoked from network); 25 Apr 2020 12:07:35 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 25 Apr 2020 12:07:35 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 063E1180088 for ; Sat, 25 Apr 2020 03:40: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=-0.2 required=5.0 tests=BAYES_40,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-f169.google.com (mail-yb1-f169.google.com [209.85.219.169]) (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 ; Sat, 25 Apr 2020 03:39:59 -0700 (PDT) Received: by mail-yb1-f169.google.com with SMTP id i16so6536361ybq.9 for ; Sat, 25 Apr 2020 03:39:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=O23UrQTTklNrcnmIQ727sANFlIG/wU18JhNSSWd+x7A=; b=uZHVSCw5KNOD+idQ6jR8RhxZelzLRHct8QrvyzADSB8BfbxtYKF0RTv6a8PcZhftRC ppBzrjbIMFkP7ZWM0EafVTmVnA2RGCEbj2oCBnbVU+jEU1+6u/HuU7Ozt2y7mtdFqQxV Be3M+myhP0PeFmYiKSZzEz+VPeTih0Q/YFHHoBwo6fAI+aKI35CtGBm2ztQH2IfkWKUK 2/tLslWvDBYcxGbW6/Mzf9T1+58iIeTyPsb1QkQJFRJCFzYwsubwSZX34QsdLx/G9OyB fWyIYs1zZyuRsMSHo/WTxqbf5t11JKYRbHxgKbmP0LY1j0ZgdEdtPsMbESHS6c0a/4Vi Gw9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=O23UrQTTklNrcnmIQ727sANFlIG/wU18JhNSSWd+x7A=; b=kf+eJuYftpssvPpWxNkGjAV1FczCGMZCzilcLKjxJ4j6Uj2A3kC5TKBu9KeZUqsffp sFnVBYSZEME+iP2HZJ6ReBiaWe2P95c+ngGsJh33rVxVctT4Brq54/hSNyBiKBvvDw/z MZdBwM+poFgp0FH1LwNoBCy8IMTHndjV2D6vYtb4m+LQnrB/pirW/NNtDoV+zbTkBV2o NO2jk7OjQ7nZQK7Aitr5aD4rUM9l6u8Atky9vEUdxY27Dd4ZLrL02HbxkeDTTeNAcFBS acYtLEhdHh/Qn1RpxSI75YGliaak3vbQdUxdhTaT06zmWxC0okqRU3SxklV71SVJSdcM CkaA== X-Gm-Message-State: AGi0PubgvrLPEAZWSKA/XsFr1VGQm/n17K2jkDGNz7kmb+T+Usv141S9 vWJJC3J5U38hCcHuPW7p14/C5C9ML4qrWRJ2xI2qbFQ/ X-Google-Smtp-Source: APiQypKOuZOvXLmOj+LiOyVBED38jNWGSUPTW65LJPvMf0QrOcDSaXQhQi85imc4FsgZLM5dIUKehJpcM6vWwRxKrtA= X-Received: by 2002:a25:5081:: with SMTP id e123mr22724203ybb.48.1587811198422; Sat, 25 Apr 2020 03:39:58 -0700 (PDT) MIME-Version: 1.0 Date: Sat, 25 Apr 2020 12:39:46 +0200 Message-ID: To: PHP internals Content-Type: text/plain; charset="UTF-8" Subject: [VOTE] match expression From: tovilo.ilija@gmail.com (Ilija Tovilo) Hi internals I have opened the voting on the match expression RFC. It will end on 9th of May, 2020. https://wiki.php.net/rfc/match_expression Here are the last changes: In the last update I mentioned allowing return values in blocks. Unfortunately, we discovered some technical difficulties (memory leaks) which are very hard to solve. Nikita is experimenting on a possible solution. There was also a fair bit of backlash over the syntax. Thus I have decided to move block expressions to a separate RFC. Note that blocks with just statements remain part of this RFC. The "duplicate condition" warning mentioned by Dan was removed due to the arguments made by Tyson. I have also moved the optional semicolon for the match in statement form to a separate vote as this was another controversial part of the proposal. Furthermore I have added another secondary vote for allowing to drop (true) conditions as that was suggested multiple times: match { $age >= 30 => {}, $age >= 20 => {}, $age >= 10 => {}, default => {}, } // Equivalent to match (true) { $age >= 30 => {}, $age >= 20 => {}, $age >= 10 => {}, default => {}, } There is a separate poll for specifying the reason for a "no" vote. Let me know if there are any other reasons so I can add those to the poll. A personal thank you goes out to Tyson for his guidance! Regards, Ilija