Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:112500 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 43464 invoked from network); 14 Dec 2020 20:53:42 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 14 Dec 2020 20:53:42 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id A1AA71804C9 for ; Mon, 14 Dec 2020 12:24:28 -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=-0.2 required=5.0 tests=BAYES_40,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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-Virus: No X-Envelope-From: Received: from mail-vs1-f45.google.com (mail-vs1-f45.google.com [209.85.217.45]) (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 12:24:27 -0800 (PST) Received: by mail-vs1-f45.google.com with SMTP id e20so2995381vsr.12 for ; Mon, 14 Dec 2020 12:24:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=silktide.com; s=googlemail; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=NRYYOEBsdOWOMwJAEdtbc8XCOd47GIw/ccUjtMn6zkI=; b=A082usUXiWpppA6LmbPgwn9DuewG7Wv7OkSLKZcXIPDopb+6Wi//6kJ3ZG91+/a4lQ rgP1ZbI0+NS+TiqYZHpBoutNI64cEgZf6EMlGEyXeG/KjB0M54/QxSZvgKcnbCkE5Ic3 IThLwT/G3nlWHt4VUcK0ePcHS5PvsvwVu3I4hDfUcDBma663yITTrCbczq1Ee9qoIuZQ huhleb5arpQQt7XxkmmDie7fEpUXidlGDX8Ydo8nCUbnzlCJGtmcMn7QffobJmPyWP+L v0hMwXfBmYXjL9GlsppVm/S8SoecnUtRJAV4WBzHF/mWPGd22IlUSavtzOQ1S6ELTrxn NhLA== 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=NRYYOEBsdOWOMwJAEdtbc8XCOd47GIw/ccUjtMn6zkI=; b=oNF2bXttE7lDPrc5bkau2CZvHbC+YOPXht4sSpBRUbb0BeXNl6vvNbmfIdNxKYqdvm z6pw9QZX96wpeg2wy97L6nHJWA4t6WyX3e/PmewZsOe5YvBx3nKiYPhwex+fMWpxww5h cmAVeeLD/GnR1TaYg2t+/QC6uVOBCivGgqlo7M7iDd5ZKSBVEk8ajNbU8vdgpe2gNaZP 2hWwvkr1wqi9YX3DS5GpVKj/us4veYTyzfrdkpLTWzcz5YBPSc8PAIwOSVf3Rcm7jYjI JGq8WHq5LL73Yzg1o9L87Zmslk2m9CjxtBWam26B6OXnayRxkT4CChtNDS2wyDH9tUwc GXIw== X-Gm-Message-State: AOAM533UYHyKYt5l6cmy6vkY00G4Hh98Y2pSRzHkWv+HhZS9+cpb/Q4E knX6Vuk+W9wDteCYRWa9UATIzB3e1gLns1dxrG6JRA== X-Google-Smtp-Source: ABdhPJw4OlSaD4abUl+YooaWnRaknuRuFUunhaPwaXT17W8MnRK3OMf+B9j6vt1ecDKuNJ7Gu3j1aduX/OOvQFnq0f8= X-Received: by 2002:a67:e185:: with SMTP id e5mr25250720vsl.22.1607977466331; Mon, 14 Dec 2020 12:24:26 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Date: Mon, 14 Dec 2020 20:24:15 +0000 Message-ID: To: Marco Pivetta Cc: Larry Garfield , php internals Content-Type: multipart/alternative; boundary="000000000000b0197605b6726d35" Subject: Re: [PHP-DEV] [RFC] Short-match From: dougnelson@silktide.com (Doug Nelson) --000000000000b0197605b6726d35 Content-Type: text/plain; charset="UTF-8" Hi Marco, Is there any chance you can elaborate on why you feel it's a bad idea? 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. Kind regards, Doug Nelson On Mon, 14 Dec 2020 at 18:14, Marco Pivetta wrote: > Hey Larry, > > On Mon, Dec 14, 2020 at 6:34 PM Larry Garfield > wrote: > > > I present to Internals this tiny RFC to follow up on the match() > > expression RFC from earlier in the year. There was solidly positive > > support for this shortcut previously but it was removed for simplicity at > > the time, with the intent to bring it back later. It's now later. > > > > https://wiki.php.net/rfc/short-match > > > > Overall back to the `switch (true)` case, which IMO is not a good idea in > first place :| > > Nothing wrong with using a set of conditional that are put in a sequence > through `if ()`, for these rare cases. > > Marco Pivetta > > http://twitter.com/Ocramius > > http://ocramius.github.com/ > -- Doug Nelson Senior Software Engineer --000000000000b0197605b6726d35--