Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:119717 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 38414 invoked from network); 15 Mar 2023 21:12:25 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 15 Mar 2023 21:12:25 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 7301718054A for ; Wed, 15 Mar 2023 14:12:24 -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, T_SCC_BODY_TEXT_LINE 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-ed1-f46.google.com (mail-ed1-f46.google.com [209.85.208.46]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Wed, 15 Mar 2023 14:12:23 -0700 (PDT) Received: by mail-ed1-f46.google.com with SMTP id eg48so21488594edb.13 for ; Wed, 15 Mar 2023 14:12:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=basereality-com.20210112.gappssmtp.com; s=20210112; t=1678914742; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=wAXNJgER2pJNYPhT9Sx5VpqnlsZD3glrQeMT0hO0ijg=; b=XDvkBybuQRFky++lNUPkLromtRdN3KMIy4lQLSskmD2EY7GBmmAhDX4QUCRtf5jEdM kf2NgcPHvuydntmRSOForD3XEb4s2CmuhEKGtvOx30lTsdTC7l1xXpK/yrvde9uPXIIE AJBRtPEkXOWTcgQD23HP/GU59DFOLfbFayO3ZzuL9RfkzQXaVcvxWCpZ6BCJnMpS+yi7 WNQqEDI/wkctjUvJ0Ju/NxrswGpZqS4lZm3H4UOeECEablVlgf7Fhv2y1x+Pm3ANoA3U rFvIMOM361VGuljWf9vgcr+ji++9tEtxfBbBbD20wfvDWZzYMBt32RzMwyOh/EVCN5A8 w8AQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678914742; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=wAXNJgER2pJNYPhT9Sx5VpqnlsZD3glrQeMT0hO0ijg=; b=xpn2n5VThwK2rlndu+F8/IER0F51+1EfaR/zjuCU6E/CekWRMAY8CQDhfhdocWGBKQ BJDNSSeSmiA5zxckDjcFKTD807tLYS5zlhveMF53J9EODngS06WJey0XUX1l2ugN42hc rqPnEnMOTbRgvXPxvN7y3mf26qqeJJqiAyXM+BylLvvTlntxG90kf8PLqQla0O5kTLsa yJlIslKj+IzhIK0diVLTRW2iIS2jgaM87oQOm4j2SqiZqtWLAIjPCZV75ldEJ8fU2izn KSi1NICVZ1M0krmzbUTo7hbbYJxpwbG4zdn+yrlwJko4bJmBHlkx2szai9pQthCIfXJW bY2A== X-Gm-Message-State: AO0yUKXWEuPaXjh9pe/sS7XkjEKjLIyZTYlRjV6+EdzlrOptfqsBKAwj S7QqAtzMYG597qsBEvAGerCcqqTzXrbc4MjLTCmKtxqHll6Hg2ytFk4= X-Google-Smtp-Source: AK7set9qCiivgpWmO02HA2/XcYed87ylvFdbzLTDy46ixqBvo4M0jolt5sd7wio33BgTiU+7ym+b1//vtIv+eRAlqtc= X-Received: by 2002:a50:d509:0:b0:4fb:f19:87f with SMTP id u9-20020a50d509000000b004fb0f19087fmr2259415edi.3.1678914742537; Wed, 15 Mar 2023 14:12:22 -0700 (PDT) MIME-Version: 1.0 References: <9975B833-EE24-4ED7-B28E-841B92988BA0@cschneid.com> <1A2CE63B-ECCA-403D-83AC-B1E26279323C@gmail.com> <9a2140b4-97bb-4a9c-90c5-809274c83f75@app.fastmail.com> <88c4a63c-859b-94d5-e314-3399fb2c3fb0@gmail.com> <1a4d4434-7318-4831-9fc0-8b48a6400a62@app.fastmail.com> In-Reply-To: <1a4d4434-7318-4831-9fc0-8b48a6400a62@app.fastmail.com> Date: Wed, 15 Mar 2023 21:12:11 +0000 Message-ID: To: Larry Garfield Cc: php internals Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] First-class callable partial application From: Danack@basereality.com (Dan Ackroyd) On Tue, 14 Mar 2023 at 16:58, Larry Garfield wrote: > > New engine approach first, then syntax based on what that approach allows. Would it be desirable to split those two things into two separate RFCs, by having the first RFC not have native syntax support, but instead another static method on Closure? e.g. something like: Closure::partial($callable, array $position_params, array $named_params): Closure {} and would follow the pattern of Closure::fromCallable() being implemented in 7.1, and the built-in syntax took until 8.1. That would also allow creating partially applied functions in a data-driven way. cheers Dan Ack