Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:114822 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 31759 invoked from network); 10 Jun 2021 18:19:50 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 10 Jun 2021 18:19:50 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 6EE8B1804AE for ; Thu, 10 Jun 2021 11:35:05 -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=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-vs1-f52.google.com (mail-vs1-f52.google.com [209.85.217.52]) (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, 10 Jun 2021 11:35:04 -0700 (PDT) Received: by mail-vs1-f52.google.com with SMTP id b1so2403743vsh.7 for ; Thu, 10 Jun 2021 11:35:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=basereality-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=kAr/BuTaURJD7EBPPTw+8mxtk+iU8jTUu6CnJnltwr8=; b=q95ogWUiChh3KhtVB8liQjwuNsWNc1VjtvXsz1S/nQec8xqWisi6rsvC0+o+CuoA9A UIB+oL3KKvOzFlMq6uLdFEvvjOLRnQUD498C4M5uWLUgyH30+tPyzJRTftHsHQ4ZEtS9 XUCvsk1XCSAQ5sOJW75HIbr9p0GgDItm9pGVFlKZ8dqnf0/6zdlpCK8il3S6bAo74rM7 0HC3kg/bE1H6I7DH9y0nUYblSIKFuWvn6MCXR5AQ30dBa5SelYWtUzA9bF1BCN/Ywtvd rb/UVZ3KXl7Kvuca+DOUbHwAHDxxczWtcm0C8goemLW135m9REQxc1lFiG1IzMpEDOmw jqKg== 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=kAr/BuTaURJD7EBPPTw+8mxtk+iU8jTUu6CnJnltwr8=; b=kOtIPJn5fVJ+KeRcxWbyUkpjvTcwGC/PQNzQQPXdmO/JR8FkTi/8A9xf/gqGjzXs1S Pzcd+do+tYTNoa5cfdREbP+0HQ18yU2n6QIbiA2x/ErFADWA33nczWFcDCTwNT2bK5HV 9DMxrxyT9Q0f2WRvd7Qactj3yVUi0cSNVF4Wxr2fwGd3TE9yliOS8M0q8XEHC0S3oFCM rOAJPlin3tbWJoOhcz78rNR71Wveqj8QXj8/Sj6RkZItqqY2PzlXVd2FGxTQsoJL6tEh nGP8UkBbShucS5rBUq+LOJ5rKL1TN+VrTSH6fpLutM3AgFscONr0wD0BY9jmJxuHeT5a cKrQ== X-Gm-Message-State: AOAM533r43y7EHJA0i01PryXVBWAa2t5KzXZeuAtH21tn6drlDjn8W2r ZzP7p7P5tsrzAy3A2t9cn3MQQkRgdrycvldCUrrvOA== X-Google-Smtp-Source: ABdhPJx0w0eZFCbEa6kDxuEdN07VSABn0OKBXGPcEqJEKDivxKBqDmtNCST5NGYcrxS5B15hcqnxcKaMkU1NnjCtYrQ= X-Received: by 2002:a67:2e4c:: with SMTP id u73mr6714334vsu.49.1623350100462; Thu, 10 Jun 2021 11:35:00 -0700 (PDT) MIME-Version: 1.0 References: <9adf063b-2598-4dd4-9e2b-cf2cd4f53b86@www.fastmail.com> In-Reply-To: Date: Thu, 10 Jun 2021 19:34:49 +0100 Message-ID: To: Guilliam Xavier Cc: Larry Garfield , php internals Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] [RFC] Partial Function Application, take 2 From: Danack@basereality.com (Dan Ackroyd) On Thu, 10 Jun 2021 at 18:32, Guilliam Xavier wrote: > Since `$null?->whatever(1, 'a')` currently always > returns null without error, shouldn't `$null?->whatever(?, 'a')` return a > closure (with a signature built from the placeholders only) that will > return null when called (i.e. equivalent to `fn (mixed $arg1) => null` > here)? No. The short circuiting should happen in the same place, no matter what is to the right of the "?->". Having the behaviour vary and sometimes not return null, would be highly surprising. cheers Dan Ack