Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:129965 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 lists.php.net (Postfix) with ESMTPS id EAF681A00BC for ; Sat, 31 Jan 2026 13:46:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1769867173; bh=vL29TkBuoPZ6LvxVd+j2z2P4Dvx332UN7HRu0D9yvvk=; h=Date:From:To:In-Reply-To:References:Subject:From; b=XF8TtQy0muSiMH3ftM5cfXuqeLdk4UdpFxxx2UvCG3cESpV05M5BImQtNm9iRw5VJ y+fj11CQR8ltPLevzv/6s0Z5OUuDiXwklshBVROnBAC9C0LcRCRefMvhbDIFzyq6wL V7vSyzOcZ3brwDb1/BWVBTtcDwS6h+vP6mPvEEIXl8mGYDOImaLymk5VRNEPuQygsX 7ndljnTqPpD/ZsfD8x7psGT7lOuXn8DwQ5ne+mqzKJJ+fThXWwlAMTaCWwWE/VYbNn B+0TxHfcsFMqNAlYBnwOQDMCa5lddLSt15Th153t/93xw1aUW7zea6T5xRzA+12Z9Z I1P/qX33nTO1g== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 0C4DF18003B for ; Sat, 31 Jan 2026 13:46:12 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING,HTML_MESSAGE, RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from fhigh-a5-smtp.messagingengine.com (fhigh-a5-smtp.messagingengine.com [103.168.172.156]) (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, 31 Jan 2026 13:46:11 +0000 (UTC) Received: from phl-compute-12.internal (phl-compute-12.internal [10.202.2.52]) by mailfhigh.phl.internal (Postfix) with ESMTP id 3723F1400086 for ; Sat, 31 Jan 2026 08:46:06 -0500 (EST) Received: from phl-imap-05 ([10.202.2.95]) by phl-compute-12.internal (MEProxy); Sat, 31 Jan 2026 08:46:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bottled.codes; h=cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm1; t=1769867166; x=1769953566; bh=tKnEutO6Hb 0d1XNKwkznkEOqbf4/EInrAmTyjkI37RE=; b=sRmi5BKOunGXGI0NMSV7Tb6sRP bhMicvFTH15s8LxN17PVu+UO9PeRMsfyH+3xjrl4KPPyWTM3AcKDj3r/H2dPyG7d Kr7shcjSOB2tQiAJw33Rz+hDJbp+r0cn8HBgzSgwvKZh6dH2RzCe4n7LGFdGyHst 4eYlYzmN8ITfVY6tAlbv6BAUZXpq6ku1J198/6JesRCVLZqgYd6cgqxaiXOPO0Vz dQaU3v6UHhTq2sDvzmifg9jQ55ZiWsiwcjerXL5oInFrae/HeXpOHitUa8w/ZXz4 1zd+HlfCB9l8ZBAV2TCBGZfXvrC3FABKnoRox80wga086I//ptbJFuybCylg== 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:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1769867166; x=1769953566; bh=tKnEutO6Hb0d1XNKwkznkEOqbf4/EInrAmT yjkI37RE=; b=FA/UKKPdu5ZU9rPj9OqYoEq++wTlVlah0aABVo1gZpjiFrgjiGl T9kl3DmGq8iaORHNoP/AJHVWZ8U+kf9MnU7UFYDwteTS2VcwKVdD7wmbWbjDzWCw ufV0paVkg2zriXm0bDh9cZQDHVfxQEQgeEL3sVYBaUmq69LQJ7yNeKJU+WQOQElY g2NqsxdJJfqJNy2cFTau64QvCqt1PsZmL+2w2JYPVbsSdb9MxfMCKKF3F3WQD7GF 8idQWsTlvkuuQJo/p4Jlh9UVkmBxRFxw17X4U9o19F9wxiAGze/Bzz4qB9nRYBzh gj8MJwwuDtDTVHLPzE8lTaApjfpj8Vz9gOA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgddujedvtdejucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucgoufhushhpvggtthffohhmrghinhculdegledmnecujf gurhepofggfffhvffkjghfufgtsegrtderreertdejnecuhfhrohhmpedftfhosgcunfgr nhguvghrshdfuceorhhosgessghothhtlhgvugdrtghouggvsheqnecuggftrfgrthhtvg hrnhepleekhedtgfefhfelieelgfegiefhkedvleefjedtffelhfehheffgfduteduuddt necuffhomhgrihhnpehphhhprdhnvghtnecuvehluhhsthgvrhfuihiivgeptdenucfrrg hrrghmpehmrghilhhfrhhomheprhhosgessghothhtlhgvugdrtghouggvshdpnhgspghr tghpthhtohepuddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepihhnthgvrhhnrg hlsheslhhishhtshdrphhhphdrnhgvth X-ME-Proxy: Feedback-ID: ifab94697:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id BE9D6182007A; Sat, 31 Jan 2026 08:46:05 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 X-ThreadId: ALl_mKsuDoEw Date: Sat, 31 Jan 2026 14:45:45 +0100 To: internals@lists.php.net Message-ID: <58b0417b-15fb-44cd-aaf1-7d88c291c491@app.fastmail.com> In-Reply-To: <53c17181-caa4-41a3-b4ab-93069e6bb47b@gmail.com> References: <53c17181-caa4-41a3-b4ab-93069e6bb47b@gmail.com> Subject: Re: [PHP-DEV] [RFC] Pipe to return Content-Type: multipart/alternative; boundary=dea3e40252b549759e90bb045594eeb7 From: rob@bottled.codes ("Rob Landers") --dea3e40252b549759e90bb045594eeb7 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Sat, Jan 31, 2026, at 06:52, Vadim Dvorovenko wrote: > Introducing Pipe to return RFC >=20 > https://wiki.php.net/rfc/pipe_to_return >=20 > In short, RFC proposes piping expression result to `return` to be used= together with pipe operator to reduce cognitive load >=20 > "Hello World" |> strlen (...) |> return; > -- >=20 > Vadim Dvorovenko >=20 Interesting, and thank you for the RFC. As a programmer though, I find b= eing able to scan the left-most columns for return statements quite usef= ul. Having to now also scan the right-most when pipes are involved (whic= h could even mean off the edge of the screen) ... not ideal. I get I could just ... not do that ... but since this seems to be about = cognitive load, I think this would actually add additional cognitive loa= d instead of removing it. Often, you need to find where the function ret= urns; more often than you need to read actual pipes. =E2=80=94 Rob --dea3e40252b549759e90bb045594eeb7 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
On Sat, Jan = 31, 2026, at 06:52, Vadim Dvorovenko wrote:

Introducing Pipe to return RFC

https://wiki.php.net/rfc/pipe_to_return

In short, RF= C proposes piping expression result to `return` to be=0A used toget= her with pipe operator to reduce cognitive load

"Hello=
 World" |> s=
trlen(...) |> return;

--

Vadim Dvoroven= ko


Interesting, and thank you for th= e RFC. As a programmer though, I find being able to scan the left-most c= olumns for return statements quite useful. Having to now also scan the r= ight-most when pipes are involved (which could even mean off the edge of= the screen) ... not ideal.

I get I could just = ... not do that ... but since this seems to be about cognitive load, I t= hink this would actually add additional cognitive load instead of removi= ng it. Often, you need to find where the function returns; more often th= an you need to read actual pipes.

=E2=80=94 Rob
--dea3e40252b549759e90bb045594eeb7--