Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:110366 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 2716 invoked from network); 4 Jun 2020 12:41:11 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 4 Jun 2020 12:41:11 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 49C0E1804C2 for ; Thu, 4 Jun 2020 04:23:35 -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-il1-f179.google.com (mail-il1-f179.google.com [209.85.166.179]) (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 ; Thu, 4 Jun 2020 04:23:31 -0700 (PDT) Received: by mail-il1-f179.google.com with SMTP id a13so5687573ilh.3 for ; Thu, 04 Jun 2020 04:23: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=c1dwncUmAV4sR/BRFZm8PWpZxMLiNjpBn8eivud/u68=; b=FlzYGaUgNukOxzA6BXjOyvRpt8h3iu1k4F9Kvu54Lsk5OkYiBgsn+fkSHVPtDBygl+ 8W8A3J4DKnvVsKgYh8xziO+RRxnpKIrGiTI1fCDFNgMrEQ2e6PvgEBYn9+m+ZY2PEGIZ yrn5Nzkf0K60RIsTPVqN7KzUMLkOHuQALsuTO6SNqMaxxtpHUbPufw79g3yKTFcgPJWf Tt5m+6CeeCkbfTDiL6MM/rhLpgSUbxhY1zzqU59idRamrYzv8uJXL5qbKSzKOho4zB04 rsdKeOX8oXvn25NRa/QmBbz0OoQV0K6bFj7aQFdHidkI/rqXGYZXTmghlHqLxGJbhvbZ +YOw== 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=c1dwncUmAV4sR/BRFZm8PWpZxMLiNjpBn8eivud/u68=; b=T2/h6nYVIfNodfSpcjrQEIXlR4vBkn/y+uYAhc+zXM/aZw2u1YcXcuj4chZ0ApKj6Q njqyJqOaX1LAVc3kjL6Bl4/cnMHQhrYbej1RTjxJ3nQ3CK49iQPQDQWLitB2d/vVZxw5 MZSMU6kW6ytG9rpPR03Xa0/CvCyDBKgd2rcVy3jXBkqcGFmLxjf27Zs1BqjLfJChZy/k jWLLfCrn7U4dU+6idBAi2nHe54/a1bpu7ckgmJsx9MGCEg1Ll7xrgaMcQ1J70vzGslXs Jn9UpulhOBthMaVH0AKI1eDopBEYbNJn6OP4tcMOv4VICg38mbtk3pU69lEnIgueqbNQ kAnw== X-Gm-Message-State: AOAM531revs/QPQIPuIEkmVU3aTtUjNhyoVErJdqWOHJNT2uEtOm9c1o eLN65B0IyApm4+cxe0M275++vVyYVb9fyNGQqBI= X-Google-Smtp-Source: ABdhPJyd35G3xt8XpvBcGGspB5h1ym97ctbNaLFmCmxF2SKoRWBJEMSedrY/rcnhozAewUMfV6E1b60eozoGWVH8M8U= X-Received: by 2002:a92:d4c4:: with SMTP id o4mr3425386ilm.244.1591269808253; Thu, 04 Jun 2020 04:23:28 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Thu, 4 Jun 2020 05:23:15 -0600 Message-ID: To: Ilija Tovilo Cc: PHP internals Content-Type: multipart/alternative; boundary="000000000000a9b14705a7405f40" Subject: Re: [PHP-DEV] [RFC] Nullsafe operator From: ryan.jentzsch@gmail.com (Ryan Jentzsch) --000000000000a9b14705a7405f40 Content-Type: text/plain; charset="UTF-8" BIG THUMBS UP for this feature. As was mentioned that TypeScript uses this and saves developers lots of time by avoiding nested null checking. I suggest in the RFC including a list of other languages that have this feature. On Tue, Jun 2, 2020, 2:53 PM Ilija Tovilo wrote: > Hi internals > > I'd like to introduce another RFC I've been working on: > https://wiki.php.net/rfc/nullsafe_operator > > It introduces the nullsafe operator ?-> that skips null values when > calling functions and fetching properties. In contrast to the last few > attempts this RFC includes full short circuiting. > > Let me know what you think. > > Ilija > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --000000000000a9b14705a7405f40--