Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:107679 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 24663 invoked from network); 25 Oct 2019 01:03:10 -0000 Received: from unknown (HELO php-smtp3.php.net) (208.43.231.12) by pb1.pair.com with SMTP; 25 Oct 2019 01:03:10 -0000 Received: from php-smtp3.php.net (localhost [127.0.0.1]) by php-smtp3.php.net (Postfix) with ESMTP id AD4D12D2005 for ; Thu, 24 Oct 2019 15:49:40 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp3.php.net X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS3215 2.6.0.0/16 X-Spam-Virus: No Received: from mail-ua1-x942.google.com (mail-ua1-x942.google.com [IPv6:2607:f8b0:4864:20::942]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp3.php.net (Postfix) with ESMTPS for ; Thu, 24 Oct 2019 15:49:39 -0700 (PDT) Received: by mail-ua1-x942.google.com with SMTP id r19so25926uap.9 for ; Thu, 24 Oct 2019 15:49:39 -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=XEuzUVYOLzBEnrFyukXJkuQQQ7xj5Uxvpn04UArFtqk=; b=s2SI0mM10wicupDsbx1K8iXM2xRCWB2HvMyvOGN+aeaD5REQrpJ2nuimf5UJ3yZFxZ 7fJ8+QQ9m7kVInbyt6BSwAhmRRdMY9naFjLU24qg+1bsgM0G+Pg4YIMzMCFUmRpYP1YB wFIPhWHd47gcjnHXBPgjlGvvXi9lhxqY502RlJVF75n4G/5Nx6qEjNq+4VaU6f5JpvFo HzhwuixOYqiZY9cisGS2gm9+oomvtictkn4QpkJvzGiGmu8M/hqs3QyJ0SYJXz6M2Ivf uEur5G4HrT3OjhBwj+var0JiIFtO0XQ9JdP8q69oLLs/y8kwmeT+4kQO3xOUG0ICBaRy BkgQ== 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=XEuzUVYOLzBEnrFyukXJkuQQQ7xj5Uxvpn04UArFtqk=; b=J+u0k9FNiCaknBGYE8N5v1sksF5h5/zXteQygUXxlWUXs0OYYj+J3fjmRJMFSSBEqs hxbjQkBRSZrKMHA6W9nhaTTkd8fYy4eUOEtsWsSeQoWQGrssp+dn8Pn+N74D+drqdOd3 dNZ346SIVTyK4arQrQX40Q3Fqa5Y6GOCBraDyMDV1+cUdOWZ3dG/vAIQA+JnNvMQeNfy O+uXP9Lghxp/kQEZ/xBzV3a8D8VIKGsf3FJUq2/FTWNdO4WwwW0cR/FB/28prFm0zrPB dsdQ/SjnwQXrmiB8XVLU6/IA0wOiEdecwh0nInuz25Dg6sA9HUY/0YYW0J6r6EFg+hZm 1qtg== X-Gm-Message-State: APjAAAVe7SR+WsZa5h2MN1GTETmBfDM38hkOlBuY3A9Ru/ksCzwBQi7G rRImUx2UxleFms2vVF7Xa3buAcX78QATWPCJycIhFg== X-Google-Smtp-Source: APXvYqzzcL9nsW97aCvAfF53mL7Ps1IG+lAkW748SLbELOciLbjn0JQhoGi25gVFviTIY2Pbjz3qAVFjWymkDjKrqv8= X-Received: by 2002:ab0:3112:: with SMTP id e18mr69357ual.22.1571957379345; Thu, 24 Oct 2019 15:49:39 -0700 (PDT) MIME-Version: 1.0 References: <5db21f54.1c69fb81.eda99.d428SMTPIN_ADDED_MISSING@mx.google.com> In-Reply-To: <5db21f54.1c69fb81.eda99.d428SMTPIN_ADDED_MISSING@mx.google.com> Date: Thu, 24 Oct 2019 18:49:28 -0400 Message-ID: To: Mark Randall Cc: internals@lists.php.net Content-Type: multipart/alternative; boundary="00000000000032b0e90595afd993" X-Envelope-From: Subject: Re: [PHP-DEV] [RFC] anti-coalescing-operator From: dohpaz@gmail.com (Ken Stanley) --00000000000032b0e90595afd993 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Oct 24, 2019 at 6:01 PM Mark Randall wrote: > On 24/10/2019 22:52, Ken Stanley wrote: > > I'm more interested in having a negation operator for the null-coalesci= ng > > operator, especially since cognatively it should be easy to discern wha= t > it > > does. > > At the point your syntax ends up looking like you're screaming at your > source code, I think easy cognition has likely gone out the window. > > There are plenty of much more expressive ways of doing this without > introducing new syntax IMHO. Mark, Yes, the operator would be new as in it doesn=E2=80=99t exist, but it=E2=80= =99s not new in the fact that it is simply a negation of an existing operator. I would be keen to see the more expressive techniques that retain the succinctness of having a not-null coalescing operator. I can certainly appreciate the hesitation to introduce more syntax. However, I am arguing that this particular case is merely an extension (compliment) of the existing null-coalescing operator and therefore it=E2= =80=99s not truly new; especially since !=3D=3D null is a very common comparison us= ed in programming. > > Mark Randall > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php Thank you. > `|>` is not something new it appeared in many languages long time ago (in some forms). JavaScript also has a proposal of it. And PHP someone has already proposed one. > https://github.com/tc39/proposal-pipeline-operator > https://wiki.php.net/rfc/pipe-operator Kosit, Thank you. In this case I=E2=80=99d still argue that my proposed operator, = for what I=E2=80=99m intending it to be, is the better solution. I appreciate that my example might not have been the best, but I wanted to demonstrate one possible usage out of many that could be used to easily solve the same problem of needing to do =E2=80=9Csomething=E2=80=9D based o= n a non-null value. Thank you! --=20 "Do not go gentle into that good night. Rage, rage against the dying of the light." =E2=80=94 Dylan Thomas --00000000000032b0e90595afd993--