Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:119682 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 14426 invoked from network); 10 Mar 2023 20:41:12 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 10 Mar 2023 20:41:12 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 044F01804AA for ; Fri, 10 Mar 2023 12:41:10 -0800 (PST) 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.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS29838 64.147.123.0/24 X-Spam-Virus: No X-Envelope-From: Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) (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 ; Fri, 10 Mar 2023 12:41:09 -0800 (PST) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 021663200958 for ; Fri, 10 Mar 2023 15:41:07 -0500 (EST) Received: from imap50 ([10.202.2.100]) by compute4.internal (MEProxy); Fri, 10 Mar 2023 15:41:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= garfieldtech.com; h=cc:content-type:content-type:date:date:from :from:in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm1; t=1678480867; x= 1678567267; bh=skpNa+QAgCHqE8ngzyrNJmXMODAcg0OSAJThd5366do=; b=m xY7TIRR2dghDi+k55CbAo8JqhSC9Ah+H5jmpD42IGjuR51bdPm16gIDJ6UrRBPYn E0XHb70uXIsU/BBsYPhxg+0J+AGIBU6sy1LJx4YVY+iZt3duGSgoysz/Q/XN5GTU VW7VLF9mjkZg+LP3fnT/JThQdG0cqHkZZvo+TQqirnof2ffeQfRt5Cchqq2TWJyK 9fGJ2sKTzeVTg1SQp3OyZQm9XQg20WJ7l2ErZQfZY9/Z/mH56dmEHEeTx6JhgsxB 1CDi961eInYLmfLHAoQn6eKj97fls3H/VkoFUqpN8c6d74un4XQJylDSDyKjdVgV T0u7eMhiSRLkRTepl/eWg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; t=1678480867; x=1678567267; bh=skpNa+QAgCHqE 8ngzyrNJmXMODAcg0OSAJThd5366do=; b=f1tWDjV9VHRpTtE4nYC0OtvtvfPDE uJ0fNMgHV+Xni6T0YcCN5IGrFIhK1hB7u6eCNIAfoTQJGZ/JJU4QGOuOrhOM/k1j 06z1BAZGRgqThXKhoXYiNmW497g+KkqsCUVEm9gwD7rORixxbbsSj3f4vHM/dpFN CONnUm9Jnv+YfNlD/EVqkMS0l2bn7PzTkEJ2TFd3gLNzG5ZREH4QOJ9WrWw8kxS8 e58WKOrC9ap7rJZs/K4hHaO7z3gsEF9QptiNQAFfHH8YpQ7d5ePgtD6Y/z4B6/Q/ 3DmUnihTUCCEarVOd791pVoZuBsG9TxZ2pv7mUnVY35/N7YIMHWYS6kEw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvddukedgudefjecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefofgggkfgjfhffhffvufgtsehttdertderredtnecuhfhrohhmpedfnfgr rhhrhicuifgrrhhfihgvlhgufdcuoehlrghrrhihsehgrghrfhhivghlughtvggthhdrtg homheqnecuggftrfgrthhtvghrnhepgeelgfekudeivddvteffueejffdthfejieevhefg ffekudevkedtvdelvddvffefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomheplhgrrhhrhiesghgrrhhfihgvlhguthgvtghhrdgtohhm X-ME-Proxy: Feedback-ID: i8414410d:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 658E41700089; Fri, 10 Mar 2023 15:41:07 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-206-g57c8fdedf8-fm-20230227.001-g57c8fded Mime-Version: 1.0 Message-ID: <3222776e-d1ca-4207-ac1c-b7677a8d0b5d@app.fastmail.com> In-Reply-To: References: Date: Fri, 10 Mar 2023 14:40:46 -0600 To: "php internals" Content-Type: text/plain Subject: Re: [PHP-DEV] First-class callable partial application From: larry@garfieldtech.com ("Larry Garfield") On Fri, Mar 10, 2023, at 2:16 PM, Eugene Sidelnyk wrote: > I glanced over this RFC and suggested syntax has question marks. Each one > stands for a single parameter. > > Since there are named arguments already, it seems to be redundant. We'd > rather pass couple of named arguments and place the ... construction at the > ending than twirl around with question marks in order to describe which > parameters final closure will have. > > When we do PFA, what we think of is what we pass, not what would be > necessary to pass afterwards. > > And yes, any feature should start from the smallest possible form. If we > try to implement all at once, we would get nowhere. (Please don't top-post.) Named args were still very new at the time, so it wasn't clear the degree to which they should be required. I still don't think only supporting named args is a good idea, as that creates additional work for common cases. Also, that wouldn't have changed the complexity part that people objected to. It was the engine telling the difference at runtime between "foo($a, $b, $c)" and "foo($a, $b, ?)", which happens inside the C code for "call a function", that was the problem. Named args wouldn't have mattered. Sometimes features can start from small forms, but not always. Sometimes that just boxes you in and makes it even harder to make the more complete version. Case in point, `readonly` was the junior version of asymmetric visibility, but was implemented too quickly without thinking through all the implications, which then caused problems for actual asymmetric visibility's implementation. That's one of the reasons asymmetric visibility didn't pass. So in that case, the junior version prevented the full version from happening. Anyway, until someone is able to commit time to coming up with a better implementation this is all moot. :-) --Larry Garfield