Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:115218 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 41272 invoked from network); 29 Jun 2021 17:40:42 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 29 Jun 2021 17:40:42 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 632D91804F3 for ; Tue, 29 Jun 2021 11:00:45 -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.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,SPF_NONE autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) (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 ; Tue, 29 Jun 2021 11:00:44 -0700 (PDT) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 75DEE5C0323 for ; Tue, 29 Jun 2021 14:00:43 -0400 (EDT) Received: from imap43 ([10.202.2.93]) by compute1.internal (MEProxy); Tue, 29 Jun 2021 14:00:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=r0Stz/cyW8NXz67Da0sY5gI1Fft0vlDNKk/xl/MNB nQ=; b=dAXdBU8kRtQL/SIUlIFQfSkvZbzfPOUp//fFp+DMeALVSrCF9gZ9H+rkS b7s6U4/LDWAHj52i9UHirhT0wmlnLL1jJgNG9/oRUt32bMfiK13mS4yYOa49rDL7 WwAHaRB+SshD07lNn0AXIqvjv4KbMlkpOmwZqL/P3EtEz1eYnNp6wPaUwdPpkxY8 B8inDlnsGWnIa+3SmTf+6+ngfmydlUn6OGr8YJM2pQelyrPhGEpWIdfHttmam698 YTIX1tlXZlx+OV/NyQuAF+sjSkaR34zV15DREsz3l52SKwcqHXXsPepE+0PUwgyS sE0YjWnhxU0m7Z7DHMB+XDz08RJIw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrfeeitddgkeehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvffutgfgsehtqhertderreejnecuhfhrohhmpedfnfgr rhhrhicuifgrrhhfihgvlhgufdcuoehlrghrrhihsehgrghrfhhivghlughtvggthhdrtg homheqnecuggftrfgrthhtvghrnhepffffffejffdugfegvedviedttedvgfejffefffej leefjeetveehgefhhfdvgfelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomheplhgrrhhrhiesghgrrhhfihgvlhguthgvtghhrdgtohhm X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 429CDAC0073; Tue, 29 Jun 2021 14:00:43 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.5.0-alpha0-530-gd0c265785f-fm-20210616.002-gd0c26578 Mime-Version: 1.0 Message-ID: In-Reply-To: References: <222b3921-3d9b-47f9-8d13-e6a123f36fad@www.fastmail.com> Date: Tue, 29 Jun 2021 13:00:04 -0500 To: "php internals" Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] [Vote] Partial Function Application From: larry@garfieldtech.com ("Larry Garfield") On Tue, Jun 29, 2021, at 12:30 PM, Guilliam Xavier wrote: > (Extracted from the "Pipe Operator, take 2" thread) >=20 > On Tue, Jun 29, 2021 at 12:54 AM Larry Garfield > wrote: >=20 > > On Mon, Jun 28, 2021, at 5:30 PM, Olle H=C3=A4rstedt wrote: > > > > > Would a slimmed down version have more support? How about removing= the > > > variadic operator, and let the user manually add the lambda for th= ose > > > cases? > > > > I talked with Joe about this, and the answer is no. Most of the > > complexity comes from the initial "this is a function call, oops no,= it's a > > partial call so we switch to doing that instead", which ends up inte= racting > > with the engine in a lot of different places. > > >=20 > Are you saying that the implementation complexity is mainly due to cho= sing > a syntax that looks like a function call? > If yes, is it also the case for the "First-class callable syntax" RFC?= > And does it mean that a different syntax (e.g. with a prefix operator)= > would result in a simpler implementation? From what I understand from Joe, most of the complexity comes from produ= cing something that isn't a closure but shares the same interface as a c= losure (at least that's what it would be in PHP terms), which then requi= res lots of special handling throughout the engine. I don't fully under= stand it all myself, TBH. I've been pondering if a completely different approach with a prefix sym= bol would be able to be less complex, and the simple answer is I have ab= solutely no idea. But we are running low on symbols... --Larry Garfield