Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:126353 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by qa.php.net (Postfix) with ESMTPS id DEE9E1A00BC for ; Sat, 8 Feb 2025 15:44:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1739029278; bh=w73D24f13A0E/sK59+Eb52G6bRD/LHoopr7aHVxgkUg=; h=Date:To:From:Cc:Subject:In-Reply-To:References:From; b=njMD0ZyHoJQlbaF8iptASUUvND0Fs2p1klCxZrHoi+6WhzqZFzb335NHkJNzSJFmv W4fN6eEeLnBHk1WEJIER7B6bLYQZWIaiopXaONNXtY8cb46MZbAFYZzt69vEpm06RL 4C9hkvE+2bqzK9JP68ZRD97jzrQ8yYBBvMuXi64+VaBuWqacXDCBI3eEoHQsGHHm9n 0BCyM4GBpzp9JSRei0CrKClPdSwUpxMHLltLnXaFskKvec4WOKeNw/UMyPOCMz5/aH 0OEMNFlpErtpX37TYdoAt8pZf4jJ0It+Tw7+ql3MoeYH/q9hURN/Z5j8MWzztLmTCT eori2e1hG9jTQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 2CDEB180081 for ; Sat, 8 Feb 2025 15:41:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mail-4323.proton.ch (mail-4323.proton.ch [185.70.43.23]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Sat, 8 Feb 2025 15:41:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gpb.moe; s=protonmail3; t=1739029436; x=1739288636; bh=w73D24f13A0E/sK59+Eb52G6bRD/LHoopr7aHVxgkUg=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector:List-Unsubscribe:List-Unsubscribe-Post; b=W0d0cJsMzr906RrvZGBtGSuiuWGQghZD0q3DFSf1QauUgVqnpvHp+TRxVOdDQEmnF 2NELn7JcrAIkD3asEvikTKxZPal3lncdddGw+4XiEb1bsQyIuoUlZTOxXEpCyrjJMH kUzezuUMsZ/W09KOzQBrjKtSP9Q1srrr6Dbo0N54H+Ss6dbKUJa9KIfvuUS13/9l2T 58EDP2oZdpQJIlYNS3+FeDe9p4u2XLlJd/5E8haxNJ+9jPaGlm5dRRhvFIuoNJks9L +cUI39wWGGpqzP52eCB2ahxixlmnpoo67V1qMVtDqZLrC1BdsTc0pZNdNM2oaSraXl Efk0P6YhR8LqA== Date: Sat, 08 Feb 2025 15:43:53 +0000 To: Larry Garfield Cc: php internals Subject: Re: [PHP-DEV] [RFC] Pipe Operator (again) Message-ID: In-Reply-To: References: Feedback-ID: 96993444:user:proton X-Pm-Message-ID: e2d061f6fa883d01abf32880d95ea61b9dbc59a0 Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: internals@gpb.moe ("Gina P. Banyard") On Friday, 7 February 2025 at 04:57, Larry Garfield wrote: > Hi folks. A few years ago I posted an RFC for a pipe operator, as seen in= many other languages. At the time it didn't pass, in no small part because= the implementation was a bit shaky and it was right before freeze. Nonethe= less, there are now even more (bad) user-space implementations in the wild,= as it gets brought up frequently in "what do you want in PHP?" threads (th= ough nowhere near generics or better async, of course), so it seems clear t= here is demand in the market for it. >=20 > It is now back with a better implementation (many thanks to Ilija for his= help and guidance in that), and it's nowhere close to freeze, so here we g= o again: >=20 > https://wiki.php.net/rfc/pipe-operator-v3 >=20 > Of particular note, since the last RFC I have concluded that a compose op= erator is a necessary complement to a pipe operator. However, it's also goi= ng to be notably more work, and the two operators don't actually interact a= t all at the code level, so since people keep saying "Small RFCs!", here's = a small RFC. :-) I'm very much in favour of this RFC, it will make writing functional and da= te pipeline code less cumbersome. I was curious *how* the blocking of by-ref parameter is done, and was pleas= antly surprised that it is done at run-time, so "prefer-by-ref" parameters = work without issues. This is good motivation for me to go back and push the by-value sort() RFC = [1] as it uses that mechanism. I've also submitted a PR [1] to add such a test case. Probably a good idea to specify this in the RFC. Best regards, Gina P. Banyard [1] https://wiki.php.net/rfc/array-sort-return-array [2] https://github.com/Crell/php-src/pull/1