Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:110415 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 90251 invoked from network); 8 Jun 2020 07:30:09 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 8 Jun 2020 07:30:09 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id D940C1804F2 for ; Sun, 7 Jun 2020 23:13:31 -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,HTML_MESSAGE, 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-io1-f54.google.com (mail-io1-f54.google.com [209.85.166.54]) (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 ; Sun, 7 Jun 2020 23:13:31 -0700 (PDT) Received: by mail-io1-f54.google.com with SMTP id w18so8448738iom.5 for ; Sun, 07 Jun 2020 23:13:31 -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 :cc; bh=WO+GA1i2qVucUQVpamaCk6yPP5ogBubaPEoJvDvXfUA=; b=N/O4LXOxPngnwU2c7Ilni5z46lI/8+H7Mpdw/PNkI39p0SEQTGKwuAI5xbgPzTyY1W OAXKqMmhs32BYvfEHunFnWPg1Y8LuI9C+tyE/uIcebbf/+8v2ZRfv8qGkpJtEVc3RGA/ 7UNwK5yCw6FqzKInqmk/DRWizccnW6dK499hJuG7oK6XmlPNdrandGWheM+a1SrmcLM1 I5OM7iLORzFSKNcVUeaR7hw/+q5qU/W9/jK9/qwo/iwVGzyRBuKfg6q8a7lI5sNUA8Lk k2niPpYgwJ0buNHUuJSZVcibak/crG3xz557LcbOCZFmZPTGSd3OF8vgBffZDvpPbTLH BiDQ== 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:cc; bh=WO+GA1i2qVucUQVpamaCk6yPP5ogBubaPEoJvDvXfUA=; b=J1HxpFD2B1p4qro+ltQBxMvorblwTBk1mLoxc81J8LkUBMwXmiMIMvYBK0ZaHef/YX 0B6uDX6JDkLm2CioLS6coX0qRyJsiZXjTGVtSbKq7gVYGgdiTk3Kxhh/7MellmlrQ+Ta bNob+4ZS3v0jkyL9tGTYcwK9WEDv1dfmIpFvN7FIbjBT83hUpKabrsK+jwFRUzUY8D2o 4VhAzonMe80MRNIif5BtFHzNPVtO1ndwROSZYqo3or8SZiX5zYhE3Gtk9R6ZHDqOGBGq k4ppBd5d5FnFu5rszoM3QQDIJ1hwBrWXWrBm6FlpLQfPhzE6yD2NogZUSUJnDMFJ/ka8 Sm9w== X-Gm-Message-State: AOAM533SoZq5ca2jLI4kfVnl4cKlh0VJwqTJG6lq5+luUZT1vV3QnNtj 7c52Xey+vS+yosIsclFOkWUxWsEBZDAWK+Wob2U= X-Google-Smtp-Source: ABdhPJxkCJsYc5yG+GQb0sGGG1+EZfi1627mQFz6mGInaUNz8zBvzRYEQi1K5ollywCdv9YogGseakGB7FEdLdxBM8k= X-Received: by 2002:a5d:8c8a:: with SMTP id g10mr20326277ion.208.1591596810733; Sun, 07 Jun 2020 23:13:30 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Sun, 7 Jun 2020 23:13:19 -0700 Message-ID: To: Ilija Tovilo Cc: PHP internals Content-Type: multipart/alternative; boundary="0000000000008789ff05a78c8259" Subject: Re: [PHP-DEV] Re: [RFC][DISCUSSION] Match expression v2 From: sarkedev@gmail.com (Peter Stalman) --0000000000008789ff05a78c8259 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Jun 5, 2020 at 3:10 PM Ilija Tovilo wrote: > > Hi internals > > > I'd like to announce the match expression v2 RFC: > > https://wiki.php.net/rfc/match_expression_v2 > > Small reminder: Two weeks have passed since I announced the match v2 > RFC with little new discussion. I'll leave it open for another two > weeks and put it to a vote then if there are no objections. I will > send another reminder one day before I do. > > Ilija > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > I really like this addition. =F0=9F=91=8D It's a great way to decrease code verbosity without getting in the way of anything else. Much better without the blocks too, since with blocks you might as well use functions or `switch`. I see you mentioned pattern matching, but I think this can be done quite well in userland. Have you thought about including ranges, greater/less than, or some form of `in_array()` matching? As for making the `(true)` optional, even though many are in favour of it. to me that seems like something that would happen when/if the `while (true)` becomes optional. There's a million examples of the latter on github, and I think it would be odd to make this optional while (no pun intended) the `while` one would not be. Thanks, Peter --0000000000008789ff05a78c8259--