3 ms·
Fibers!!! Who wants to bet we are a few releases away from async/await syntax now. Giving credit where it’s due Microsoft with C# pioneered the syntax and every
by maxpert 5y ago
Fibers!!! Who wants to bet we are a few releases away from async/await syntax now. Giving credit where it’s due Microsoft with C# pioneered the syntax and every classic (including a few modern) language has adopted the syntax.
I believe we are a few steps away from a fully builtin production ready server and db connection support.
- gmfawcett 5y agoI think the hope here is that you don't need async/await syntax. The fiber implementation is supposed to abstract over both sync and async implementations.
- donatj 5y agoAsync/await isn’t something to hope for. It’s a terrible pattern languages should work hard to avoid.
- tehbeard 5y agoCare to explain why?
- gmfawcett 5y ago"Async-await is nice, which is why we’re adding it to Dart. It makes it a lot easier to write asynchronous code. You know a “but” is coming. It is. But… you still have divided the world in two. Those async functions are easier to write, but they’re still async functions. "You’ve still got two colors. Async-await solves annoying rule #4: they make red functions not much worse to call than blue ones. But all of the other rules are still there: ..." You can continue the story at: https://journal.stuffwithstuff.com/2015/02/01/what-color-is-your-function/ https://journal.stuffwithstuff.com/2015/02/01/what-color-is-...
- tehbeard 5y agoWhat usecase would async/await have in day to day PHP use? I can see it being a boon for the esoteric stuff like ReactPHP, but for a regular MVC site it just seems like a unnecessary complication? In JS land, it atleast makes interacting with the event loop and NOT blocking the UI thread easier.