Re: PHP True Async RFC Stage 4

From: Date: Thu, 23 Oct 2025 15:18:28 +0000
Subject: Re: PHP True Async RFC Stage 4
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15  Groups: php.internals 
Request: Send a blank email to internals+get-128932@lists.php.net to get a copy of this message
> Why not keep the name Awaitable instead of creating a FutureLike, but just harden the
> interface? We can always loosen the interface in the future, or create a new interface for
> "streaming"
> awaitables (aka, multi-shot Awaitable). Then await() could change its signature from
> Async\await(Awaitable $awaitable): mixed to Async\await(Awaitable|StreamingAwaitable $awaitable) at
> some
> point in the future -- and it would be BC.

The Awaitable interface is not typically associated with
Future/Promise. While the term Future is known to almost everyone. The
degree of recognition for Future is much higher.
The term StreamingAwaitable reflects a different meaning.
The fact that FutureLike extends the Awaitable interface reflects the
idea that Futures can be used in select-like operations just as
Awaitable objects can.

If someone prefers a different name instead of Awaitable, I have
nothing against it, but please provide a rationale.


Thread (104 messages)

« previous php.internals (#128932) next »