Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:114464 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 90360 invoked from network); 13 May 2021 17:18:08 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 13 May 2021 17:18:08 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 2C4DF1804B1 for ; Thu, 13 May 2021 10:26:28 -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-Virus: No X-Envelope-From: Received: from mail-ed1-f44.google.com (mail-ed1-f44.google.com [209.85.208.44]) (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, 13 May 2021 10:26:27 -0700 (PDT) Received: by mail-ed1-f44.google.com with SMTP id b17so31859310ede.0 for ; Thu, 13 May 2021 10:26:27 -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=NCPaAeGg/PZBy3b8mKVoQeEjEfwUhuwO5hEMo2gpKn4=; b=dAdv8TGvPFLN1UCCQU23RS6eTSWcszW3Txwr2Nh/kj+H/xQfjQmO6Ul06CbzyzIBVx WvqPCMFkjw7+qRSprDODNiEfbGYMirA3qBrrmjireWkHWfLgRNJL1lC1gE/RBkDlAl7H yRJ2J7sb/u659Ano9wEKRdYxPQarzL5By0yB62NVyMMuDf1g2r92feRH1GUJMAy550q1 Q7J/m14+SRMSryt5QQjPq7v5FCqy0RmNihHhi5ZkWTjA3v56AVUsMw/8l5fF08239/DW 5xLmweX6avX+z0qYSncL9S21f7TtYR+n/LCEUo1IOCsU1BaQYsJC2LzrihC4TK3JSPIo HWCQ== 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=NCPaAeGg/PZBy3b8mKVoQeEjEfwUhuwO5hEMo2gpKn4=; b=UGh0ryGCqWMpuk7USGtSxbLxOdTqGByjSZUxFj3zlu2BRJzVqPavzEsJ53s+eHtrQx +58BLawwotWadEC42X3NVZqkXBIlzLR3oSXCfnK2KC8rDPoeSTOhjBVOp5y87eD3zd1g NPJhjQGDBy5nkPKf94mXBUQwLlIwR0bkP0E+t/FpFc0ZGVYKSfGVXwCh2oUOzP3XRPM9 /Wg6+NTdj3b6dsLekXmBS89SygiFoWFziWZ57RyFtvq3eh+mWmZPVdAAFM/WXexdbtJv SXgljbjaOxq4UIxbTsbm/dlstaKfcKwQhLu82iWi19h8/J8dbSKJso240ioSBp14ryt4 mILA== X-Gm-Message-State: AOAM5309W79NvxV+F0kG54n1vOqThllylfzYQiA/2rWDGt21IkicgGaF ftORxlBRGmaaZAXbGH8tgAJywActf7hq+BVDN3w= X-Google-Smtp-Source: ABdhPJxfFA6LRYOY2UgKPulCzxVOR4pn1jvXB5irY1KDifEArVe7kTkS721HYh1vApgKOsU9ZfhSXr4TXm0r3AvJYt8= X-Received: by 2002:a50:fc91:: with SMTP id f17mr51444181edq.23.1620926786568; Thu, 13 May 2021 10:26:26 -0700 (PDT) MIME-Version: 1.0 References: <4340a481-e4a3-4805-8dfc-df3c037d6cdf@www.fastmail.com> In-Reply-To: <4340a481-e4a3-4805-8dfc-df3c037d6cdf@www.fastmail.com> Date: Thu, 13 May 2021 19:26:14 +0200 Message-ID: To: Larry Garfield Cc: php internals Content-Type: multipart/alternative; boundary="0000000000005206f805c2396d12" Subject: Re: [PHP-DEV] [RFC] Partial function application From: nicolas.grekas+php@gmail.com (Nicolas Grekas) --0000000000005206f805c2396d12 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Le jeu. 13 mai 2021 =C3=A0 19:00, Larry Garfield a =C3=A9crit : > On Tue, May 11, 2021, at 10:38 AM, Larry Garfield wrote: > > On Sun, Apr 25, 2021, at 2:25 PM, Larry Garfield wrote: > > > Greetings, Internalians! > > > > > > I would like to offer for your consideration another RFC, specificall= y > > > syntax for partial function application. > > > > > > https://wiki.php.net/rfc/partial_function_application > > > > > > It includes an implementation by Joe Watkins that is already about 95= % > > > complete. (There's some edge cases he's still sorting out, but all o= f > > > the typical cases should work already.) Most of the design work come= s > > > from Levi Morrison and Paul Crovella. I helped out with the tests, a > > > few edge bits, and general instigator/nudge. :-) > > > > > > Discuss. > > > > It looks like the conversation has died down, and it's been two weeks, > > so pending any other notable feedback I'll open a vote on this RFC on > > Thursday or Friday. > > Naturally there was more conversation. :-) But good conversation, so the > RFC has been updated again. I recommend everyone look it over another ti= me. > > Highlights: > > * Joe was able to figure out how to fold the extra partial logic into the > Closure object. So the Partial and ReflectionPartial classes are gone; > partial application gives you a closure object that looks like any other, > but still manages to optimize away repeated partial application. > > * Some descriptions were improved. > > * Constructors already worked, with some caveats. Joe managed to remove > those caveats, so they now work as you would expect them to. (See the RF= C > section for details.) > > * I included some references to other languages and how they handle > partial application. Short version: This is the most robust and most ful= ly > featured version of any language I could find. Rock on, PHP! :-) > > * Nicolas, I went ahead and made a test for > partial-application-DI-autowiring, just to see what it would look like. = It > looks like this: > > > https://github.com/php/php-src/pull/6898/files#diff-218bb085c4cf4a35da35a= a2d7a5cabd77f053d6f975340c2ef10de6f30dee503 > > Whether that's actually useful or not I don't know, but there it is. :-) > > Since there were some substantive changes, we're pushing the vote start > off until the first half of next week, Monday/Tuesday timeframe. > That's pretty damned cool, frankly. Thanks to everybody involved, I can't wait! Nicolas > --0000000000005206f805c2396d12--