Re: PHP True Async RFC - Stage 2
| From: | Edmond Dantes | Date: | Sun, 16 Mar 2025 18:32:14 +0000 |
| Subject: | Re: PHP True Async RFC - Stage 2 | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-126787@lists.php.net to get a copy of this message | ||
Hello, Vincent.
>
> Personally, i love the formal RFC for it's low level accessibility and
this new RFC isn't that bad.
>
If you mean classes like SocketHandle and so on, then the low-level API can
be available as a separate extension.
>
> The
spawn keyword maybe the right keyword to use but it seems
> more
weird, can we find another keyword to use other than that?
> Most languages i've seen make use of only the async/await
> keyword.
>
Yes, spawn has the downside of being more associated with threads. Here are
some other possible options:
- launch — like in Kotlin
- go — the shortest option
async is not the best choice because it looks more like an attribute, while
we would prefer to use a verb.
From a brevity standpoint, I like go, but after that, Go developers will
have to implement the $ symbol for all variables :)
---
Ed.
>