Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:107683 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 40770 invoked from network); 25 Oct 2019 02:17:03 -0000 Received: from unknown (HELO php-smtp3.php.net) (208.43.231.12) by pb1.pair.com with SMTP; 25 Oct 2019 02:17:03 -0000 Received: from php-smtp3.php.net (localhost [127.0.0.1]) by php-smtp3.php.net (Postfix) with ESMTP id 9727E2D1FE2 for ; Thu, 24 Oct 2019 17:03:34 -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=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,URIBL_BLOCKED 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-qt1-x834.google.com (mail-qt1-x834.google.com [IPv6:2607:f8b0:4864:20::834]) (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 17:03:34 -0700 (PDT) Received: by mail-qt1-x834.google.com with SMTP id m15so647991qtq.2 for ; Thu, 24 Oct 2019 17:03:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dqxtech-net.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=F2ayh/kemJwq+aoL9zfj6lfv9pkHhz2zqVoMLmZCN64=; b=rl7APsaD2Or32mp3RR7B8gPvLDj7O+Fvjz1VWy//qSPK5ol5qn/eBhMTHftkhWA1Pj lKdw2BrE2/RapRfsa0utJXOanZ6Y+c/HEe3bb/QEcQ8jlL7gvhsUQXx2EFsIAbKZu3vc c4qG4/gc3BoI1oCCIJGiQUv4P6W5YBt5xKkJ6sqi1I/3/G7AR++AT0Nd0rmlmMoIXFXq JrsVFBdzJ7JEGP+hlTNc7jDEBjR5ZBuwEvIz7gHHSBHdPaxuQdqdLEj5jnLsYrqJ27Sa d3oIdINnErdofZz5TGYcIwolFjeDF3nf34O8IE3zwvwRmIZa4Z9PUGzyM7DH5USo6g2O nDLg== 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=F2ayh/kemJwq+aoL9zfj6lfv9pkHhz2zqVoMLmZCN64=; b=S81lKFwi5J4litgIMCPKSj9BLL5Z61674VppTwCgP4cSvc9N8jszX0W/LoGawxNkfE nsy6PIlC7EfBjtmKx4IeIIMjiK+4xGMGnKMelFcvfgZvrYwa7jevVbamcKhLkzwzTST1 7F8LSIMPytpVKAjEMin83ZlQMbvxkbiGrb0Jo1zkJXbslHBu/0sCHYdgb2Ve9f2JU8RU iUyAsizVKJrzDV8BZXF/uXQqf3s6P+mNgU+O1uIINwmroS2J2iEq16Azh6Mj8Vd2Qjyi yI+8ALPi33Neuu6nGe5ySOoap+vq3llC/FpbUpmANuhDh33YcqI7D6BSAbBoXNJnXF5M ybKg== X-Gm-Message-State: APjAAAUFvcMO2Y2ATClQYo9IyVcwiztKXdq3ErSHL3Z6YpKdQkh8PgDJ Kha/AZgW7RhjB9/1DKjsa8ZyERsPxSM= X-Google-Smtp-Source: APXvYqwJgZc9Wt8lOoIA07L71KqmTX9TsS3EdQTRWVk+9o4dZckEWxCDRTcFD1UAtIPbbpSiFnFdtA== X-Received: by 2002:ac8:4a15:: with SMTP id x21mr365014qtq.285.1571961813739; Thu, 24 Oct 2019 17:03:33 -0700 (PDT) Received: from mail-qk1-f180.google.com (mail-qk1-f180.google.com. [209.85.222.180]) by smtp.googlemail.com with ESMTPSA id o2sm189843qte.79.2019.10.24.17.03.32 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 24 Oct 2019 17:03:33 -0700 (PDT) Received: by mail-qk1-f180.google.com with SMTP id 15so144034qkh.6 for ; Thu, 24 Oct 2019 17:03:32 -0700 (PDT) X-Received: by 2002:a37:8ec7:: with SMTP id q190mr526885qkd.46.1571961812706; Thu, 24 Oct 2019 17:03:32 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Fri, 25 Oct 2019 02:03:21 +0200 X-Gmail-Original-Message-ID: Message-ID: To: Sara Golemon Cc: Stephen Reay , Dan Ackroyd , Ken Stanley , PHP internals Content-Type: text/plain; charset="UTF-8" X-Envelope-From: Subject: Re: [PHP-DEV] [RFC] anti-coalescing-operator From: andreas@dqxtech.net (Andreas Hennings) On Fri, 25 Oct 2019 at 01:28, Sara Golemon wrote: > > On Thu, Oct 24, 2019 at 12:46 PM Stephen Reay > wrote: > > > This sounds like an alternative approach (for solving the same basic > > problem) to the nullsafe operator discussed a while back, no? > > https://wiki.php.net/rfc/nullsafe_calls > > > > At the risk of hijacking, @matthewrask asked me about ?-> a couple weeks > ago (Javascript is making this one popular), and I threw together a rough > PoC at > https://github.com/php/php-src/compare/master...sgolemon:null-coalesce which > I suspect he intends to RFC properly soon. As long as the topic is at > hand, what's the general appetite for it? Should I bother polishing the > turd? > > -Sara ?-> is a great idea. The problem is this only works for method chaining, not for function argument nesting. So we might want something else in addition to that. foo(bar(baz() ???) ???); -- Andreas