3 ms·
Coroutines have been available via many packages for a while; (Open)Swoole and Amp come to mind, but there are probably others. Laravel has supported using (Ope
by vedranm 4y ago
Coroutines have been available via many packages for a while; (Open)Swoole and Amp come to mind, but there are probably others. Laravel has supported using (Open)Swoole via Octane for over a year. Why would having coroutines as fibers in the core be a gamechanger?
- geenat 4y agoSee: https://news.ycombinator.com/item?id=32726419 https://news.ycombinator.com/item?id=32726419 Performance without downsides.
- capableweb 4y ago> Why would having coroutines as fibers in the core be a gamechanger? Plenty of technical reasons but for me, the biggest is unity among libraries/technologies. There been versions of coroutines/fibers around PHP for many years, first time I heard about it was a PHP fork that implemented fibers, don't recall the name but must have been something like 10 years ago... But the problem has always been that you cannot rely on the community having things like that available. Having it in the core language, means that more libraries can depend on it, and users are therefore incentives to learn more about it, as they can rely on it sticking around. Overall, I'm happy it's coming into the core language.
- rob-olmos 4y ago> first time I heard about it was a PHP fork that implemented fibers, don't recall the name Probably thinking of HHVM/Hack: https://docs.hhvm.com/hack/asynchronous-operations/introduction https://docs.hhvm.com/hack/asynchronous-operations/introduct...
- vedranm 4y ago> Having it in the core language, means that more libraries can depend on it, and users are therefore incentives to learn more about it, as they can rely on it sticking around. Symfony 6.1 and the upcoming Laravel 10 require PHP 8.1+, but I don't see them using fibers yet. We'll have to wait and see.