Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:110098 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 82616 invoked from network); 9 May 2020 17:31:56 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 9 May 2020 17:31:56 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 3A6ED1804D3 for ; Sat, 9 May 2020 09:07:54 -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, 9 May 2020 09:07:53 -0700 (PDT) Received: by mail-yb1-f169.google.com with SMTP id r14so2649982ybm.12 for ; Sat, 09 May 2020 09:07:53 -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=wgIG7RyreiKPkbk28S+xTasye6lU5CWdEvqAgf3kW00=; b=VRPrNqn6vBgQGQrST8wfJ3kUHOpq97N6D4PyKR2d696UyU4fOalpZRwf+hKcS3/ry5 iuYu+ciuVAJM63MlAKNfBIsWASthxohLTPnV9JX+cMAmX3IhJ8sMDWm9mi+sc9+0MWRy /zCvK1v5kx2ppmaLa4Z2SFeglLhCo8X5jE83nfroUIfyI6dIkTLzhFAwsUAVgzAnLjKy zPyZDu7oK+JOZm8MgpS4nq8wwDsbEmdOnTR2JJaM3UKIHvUMeNlLgtrRWuLHqz8v7+dG yflSx7iX5EZqiRYp2NyeiGM7xjkKpWQBvSxYCiZxvTLB6kdbQ3X7bzmLMQ0j4zI/MW7F +OTQ== 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=wgIG7RyreiKPkbk28S+xTasye6lU5CWdEvqAgf3kW00=; b=qA8vlEOrarW0jkStj2xREGLJUFzCoCd80U+50snanNt0WXMHZIFKUgU+EJ+YlyNsEc Oxl9uBlsc5hPQd2Hkw37Hrnh+qw3SWt6EEmOQkVPU28DC/PzPexpxBBLMZ1rGYWoz8dD ZORZCM+R6SBv+JF0E2ETBh5VGnVgCgz9M31mfU2CEhVkEfyWUY2ndP1865xK1rMZwdfF S80ciZgSo37ghnUdJ4dPMPJTgVtyN7/vqC6v255UuTcTnZDv4rLsWKsSU+e7TB1flhkf 2puaX6NQMhIjt7eRuxpk8UBnWOKRuioBfyZ1yw8Bkk4XOvhf8FC6na3yr2WP9aBye1Xi PHmw== X-Gm-Message-State: AGi0PuahOAHby4EvNvkAMmTTzt7wofi6lM/tW7mjjk8n3D6Ht0PQIjWp wOvbUYXz6ta5nc5jfUD+WdRmI5WZNgJCTD4x84Zpu5hm X-Google-Smtp-Source: APiQypLmK+7dRONnYWcjlfdpew+R3hfixOX6AIMDC7Bwy/Ri0tzkovLjso66zxYtW7gUCwzDnC1hkniSSTelWqF6HtI= X-Received: by 2002:a25:b09b:: with SMTP id f27mr12709850ybj.411.1589040472849; Sat, 09 May 2020 09:07:52 -0700 (PDT) MIME-Version: 1.0 Date: Sat, 9 May 2020 18:07:40 +0200 Message-ID: To: PHP internals Content-Type: text/plain; charset="UTF-8" Subject: [DECLINED] match expression RFC From: tovilo.ilija@gmail.com (Ilija Tovilo) Hi internals I closed the vote on the match expression RFC. https://wiki.php.net/rfc/match_expression First of all, thank you to everybody who participated! It was declined with 28 no and 6 yes votes. There were three main criticisms: 1. The RFC wasn't discussed extensively enough and too many changes were made last minute 2. match should be expression only (no blocks) 3. Omitting (true) should loosely compare the arm condition to true Criticism 1 is absolutely justified and 3 makes sense to me. Unfortunately, I think criticism 2 somewhat defeats the purpose of the RFC (at least how I envisioned it). The main motivation to me was a new switch statement with safer semantics. Returning values was a nice secondary feature. According to Nikitas analysis (1) an expression only match would be usable in roughly 40% of cases where a switch would've previously been used. Failing to address the other 60% seems less than ideal, especially given the fact that the plan is to extend match with pattern matching. If we do decide to remove blocks I think the RFC needs to find a different motivation since criticizing switch without offering an alternative seems disingenuous. I will take the next few days to think about how to move forward. Thanks again! Ilija 1) https://externals.io/message/109842#109868