Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:128894 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 A835F1A00BC for ; Wed, 22 Oct 2025 06:38:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1761115136; bh=ikti/JB23dy8LXOsOrXdTh6fc9Df4YZsnRKPEOzbUrc=; h=Date:From:To:Cc:In-Reply-To:References:Subject:From; b=b8C9EVBNmtmypayinCZFxJQMTUtdMudoJ8HnMSk/FsFkCfRVLu2rN/6j9eDP5HTzU ZBZYSYOUdmLTxZ9c+Ni+KwL1h2e2jIeEyxlDppQthqtWFktfbHftIZ771F7nxEMwMI 82PGxa1o45IHkpR+JHUyUyxMHw9/UApfr0tjwU72tHr4gHhjdjLb5SFvH2Q11dknF8 hfOYLuv75aBA5w0Mq1CO4CqRG5+NyfmrMsElKfIPfbHiYgsNGtmKO+Aqbi0W+O68I5 9Tesyz9a/r4r1wBUre91x4kF6pNU7GGZkTayR8FxoyPvLxesXkwRBFNgSJ7WhbgHf4 bxuchpNFZ1o0Q== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 4C7CC180032 for ; Wed, 22 Oct 2025 06:38:55 +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=-1.4 required=5.0 tests=BAYES_05,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING,HTML_MESSAGE, RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS, SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from fhigh-b1-smtp.messagingengine.com (fhigh-b1-smtp.messagingengine.com [202.12.124.152]) (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 ; Wed, 22 Oct 2025 06:38:54 +0000 (UTC) Received: from phl-compute-05.internal (phl-compute-05.internal [10.202.2.45]) by mailfhigh.stl.internal (Postfix) with ESMTP id E3C387A0157; Wed, 22 Oct 2025 02:38:48 -0400 (EDT) Received: from phl-imap-05 ([10.202.2.95]) by phl-compute-05.internal (MEProxy); Wed, 22 Oct 2025 02:38:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bottled.codes; h=cc: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=fm3; t=1761115128; x= 1761201528; bh=ikti/JB23dy8LXOsOrXdTh6fc9Df4YZsnRKPEOzbUrc=; b=U IoNwVMkW+o8ZdEhd52jv2ihkL6J0GGr6kUHQRIEvZjEj6NNetE1rFGUjiCVt4Cc1 lN0OVjJPLNhrsM7FA5swBwpHIrQawVkOOCxTk4vPELS0xUKaXo/NpXchC6HKami0 1zmXb5mpPqi0D8zuBiMzwSmO1pivx0HoJQwFKTHRU2ItfffysEi/7dwlFPM1wHxU agD+s3veFQi+EtTrk4vfyfGHrAwc4K/jzARIuxVwpNnwDZeUZ0k0riFlI3mFh8Vw NUtr+8M7tyOmyzifQe1s/mmTuHIOcepB+fQqK2YHW9TAn+ke+KnTGjbjR0vbQ5P9 OIWDAyPJ97Y+RqrCnVQBg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc: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=fm2; t= 1761115128; x=1761201528; bh=ikti/JB23dy8LXOsOrXdTh6fc9Df4YZsnRK PEOzbUrc=; b=EJV9Vg+2Wspg4EUTUt0dwWW8AauGpqAga0JICpfWmQsH7AlHA7S j3yGkq117L2M5e3WBV9uKxPTR1qXMNxxB/ijO7c2q/WKl4Pyp3bzrBbcQGa6SqAX 1j465ada6q/R0GMnajm5LHKRDdvu4QkEEvLgdCep2YvdSNpkH+CkSyv2P/ZeKRtu VkMLQqr6CuwaImfEiMyRWm1pZxadNkO0SGk4+T5grvTVe6tXxscNFXa7P9SEA51j LQoIrfje3t/Yu/QS60XSYer4dACpJJGXSXnCgIiudM7Su/aHtqYOqLKk+qJKlI7P XTy3X8t1LnMbqwAxofMumSW3Jd/NSoB1EzA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggddugedvkeekucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepofggfffhvfevkfgjfhfutgesrgdtreerredtjeenucfhrhhomhepfdftohgsucfn rghnuggvrhhsfdcuoehrohgssegsohhtthhlvggurdgtohguvghsqeenucggtffrrghtth gvrhhnpeeiueethedvvdefjefhgfeiheelheehtdfhfeekjefflefgvedvkeduteejjedt tdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehroh gssegsohhtthhlvggurdgtohguvghspdhnsggprhgtphhtthhopeefpdhmohguvgepshhm thhpohhuthdprhgtphhtthhopegvughmohhnugdrhhhtsehgmhgrihhlrdgtohhmpdhrtg hpthhtohepihhnthgvrhhnrghlsheslhhishhtshdrphhhphdrnhgvthdprhgtphhtthho pegrrghrohhnsehtrhhofihskhhirdgtohhm X-ME-Proxy: Feedback-ID: ifab94697:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id 589B51820054; Wed, 22 Oct 2025 02:38:48 -0400 (EDT) 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: AG5VjklPAjNR Date: Wed, 22 Oct 2025 08:38:28 +0200 To: "Edmond Dantes" Cc: "Aaron Piotrowski" , "PHP Internals" Message-ID: <2f8524a7-dea2-4fbf-933a-c538d3706253@app.fastmail.com> In-Reply-To: References: <0e4e39d6-9cc9-4970-92e0-2463143b4011@app.fastmail.com> <37180d8d-85b4-49a3-a672-334bf4329470@app.fastmail.com> Subject: Re: [PHP-DEV] PHP True Async RFC Stage 4 Content-Type: multipart/alternative; boundary=58c6cb86f1e34bc6940021e472bf38e1 From: rob@bottled.codes ("Rob Landers") --58c6cb86f1e34bc6940021e472bf38e1 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Wed, Oct 22, 2025, at 06:32, Edmond Dantes wrote: > Hi >=20 > > I don=E2=80=99t think it=E2=80=99s a =E2=80=9Crule=E2=80=9D per se a= nd why I suggested breaking it up into two different kinds of Awaitables. > > Invariants make code easier to reason about and work with. The more = invariants you have, the easier it is to form, maintain, and refactor. >=20 > So that is the rule: **invariants make code easier to understand**. > A more general principle is stated as follows: reducing complexity. >=20 > I think this point needs some thought. > If the await operation is allowed only for Future, it will make the > code more consistent which is a good thing. >=20 > Then it will be necessary to add a FutureInterface, and Awaitable > should be hidden from the UserLand namespace. A simpler solution might be to keep things as they are, but have the non= -idempotent constructs be generators of Awaitable instead of non-idempot= ent Awaitables. This would basically mean just changing some text in the= RFC and some implementations that aren't documented in the RFC (as far = as I can tell). =E2=80=94 Rob --58c6cb86f1e34bc6940021e472bf38e1 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
On Wed, Oct = 22, 2025, at 06:32, Edmond Dantes wrote:
Hi

> I don=E2=80=99= t think it=E2=80=99s a =E2=80=9Crule=E2=80=9D per se and why I suggested= breaking it up into two different kinds of Awaitables.
> I= nvariants make code easier to reason about and work with. The more invar= iants you have, the easier it is to form, maintain, and refactor.
<= div>
So that is the rule: **invariants make code easier to= understand**.
A more general principle is stated as follows: = reducing complexity.

I think this point needs s= ome thought.
If the await operation is allowed only for Future= , it will make the
code more consistent which is a good thing.=

Then it will be necessary to add a FutureInter= face, and Awaitable
should be hidden from the UserLand namespa= ce.

A simpler solution might b= e to keep things as they are, but have the non-idempotent constructs be = generators of Awaitable instead of non-idempotent Awaitables. This would= basically mean just changing some text in the RFC and some implementati= ons that aren't documented in the RFC (as far as I can tell).
=
=E2=80=94 Rob
--58c6cb86f1e34bc6940021e472bf38e1--