Re: Re: async/await - is future reserved words in PHP 7.x?
| From: | Niklas Keller | Date: | Wed, 04 May 2016 16:44:46 +0000 |
| Subject: | Re: Re: async/await - is future reserved words in PHP 7.x? | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-93073@lists.php.net to get a copy of this message | ||
2016-05-04 16:40 GMT+02:00 Stephen Coakley <me@stephencoakley.com>:
> On 05/04/2016 05:59 AM, S.A.N wrote:
>
>> EventLoop interface, on development stage:
>> https://github.com/async-interop/event-loop
>>
>
> That's a userland design for event loops; async/await and coroutines don't
> necessarily depend on an event loop. They could be added to the language
> without an event loop, and simply require the user to provide the event
> loop.
>
Would be strange to have async / await in the language without an event
loop, but it's possible, yes.
> My idea was to make a transition into async as simple as possible.
>
> Also, I'm partially responsible for the event loop interface above. :P
>
> PHP wrappers for libev and libeio supported PHP 7.
>> https://pecl.php.net/package/ev
>> https://pecl.php.net/package/eio
>>
> >
>
>> libuv - certainly better because it has everything you need and a huge
>> community.
>>
>
> I agree; libuv is probably the best of the bunch, if we include an event
> loop library in future versions of PHP. It is not necessary to have a PHP
> wrapper for libuv, since if it was included in the interpreter itself we
> would be just using the C interface.
>
> Very need async/await in the PHP core (based on generators).
>> Perhaps there are plans in core developers, for implement async/await?
>>
>
> /Legend speaks of such plans, but they come and go in whispers. Like a
> shadow, or a mist from the east. The prophecy spake of such features
> targeting PHP8; lo, most believe it to be myth./
Why do we have to wait until PHP 8? Should be mostly backwards compatible
and be fine in 7.2 or so. Issue is probably more deciding on an API.
>
> --
> Stephen
>
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>