Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:112503 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 51252 invoked from network); 14 Dec 2020 21:52:43 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 14 Dec 2020 21:52:43 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id EF01E1804D4 for ; Mon, 14 Dec 2020 13:23:29 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: **** X-Spam-Status: No, score=4.0 required=5.0 tests=BAYES_50, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_SOFTFAIL autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-lf1-f46.google.com (mail-lf1-f46.google.com [209.85.167.46]) (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, 14 Dec 2020 13:23:29 -0800 (PST) Received: by mail-lf1-f46.google.com with SMTP id y19so33859999lfa.13 for ; Mon, 14 Dec 2020 13:23:29 -0800 (PST) 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=TWS0m/Iqcfi2rn8zqzfRFWq9WmOOV9JzCa3DpGVaw64=; b=XX8YFGo3Qui2CVHM6rZQsV+C5x1H3obZQdTLkUAUCMvzdqHxlWImR3+ZK1cA6Ssx+d 9pYJucOIXj9yIw6w1N9Mh50a52XTl33TNKw+p2Ra3/GtG2rRpmpWE01aLM05wKtJQZnt ZxhL7qGq7MJMI2rxH0PhxNfhhhcdCWk/5pEyi/2/Ydf9Svx7iQc/jpulY7wo0QdBd1uk GdybtLOlbXUp4M+D9GEmeHrSUNNL93niq718WL8ZettAU4yU51skWYCUIiDHU3VfekdN c4R2xZhNf0GTfx2L/TEYvoHCg9fb/rFQBHIGwhuGvG4o2ViRisYGqPp/HJeXyqsQPPxC NwMQ== X-Gm-Message-State: AOAM531jw5C/2VmuCTyqIDLo7SDC1bEZZTQ4EWR2xTzWVoi8HdOyKeqt Or1+rym32xlsqjV4Sby5nbccmd4VW0ovZtfEgOGZRw== X-Google-Smtp-Source: ABdhPJwnptrEz5pA8vXf1BqcFI74U0Q8Q5YhMcYaq4Xb4/rRadHXpstv004+OM8GjC3UGOurqMQnVz1O95jnFPhrXak= X-Received: by 2002:a2e:b0e5:: with SMTP id h5mr652109ljl.365.1607981006909; Mon, 14 Dec 2020 13:23:26 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Date: Mon, 14 Dec 2020 15:23:16 -0600 Message-ID: To: Doug Nelson Cc: Marco Pivetta , Larry Garfield , php internals Content-Type: multipart/alternative; boundary="000000000000b908a005b6734009" Subject: Re: [PHP-DEV] [RFC] Short-match From: pollita@php.net (Sara Golemon) --000000000000b908a005b6734009 Content-Type: text/plain; charset="UTF-8" On Mon, Dec 14, 2020 at 2:24 PM Doug Nelson wrote: > Both you and Sara at different points have talked about thinking was bad > practice, but I've not read anything compelling about why it should be > considered as such. > > I'm not a full -1 on the concept (especially as match(true) has the convenience of returning a value), but it's very square peg in a round hole to me. At the end of the day though, that's a style choice and not one I have any business imposing on anyone, and certainly within the context of this diff, the actual change is trivial. It's sugar for match(true) that looks like match. /shrug I might suggest broadening the scope to include `switch` as well though. If we're going to codify match(true) as a pattern, we should at least be consistent about it. -Sara --000000000000b908a005b6734009--