Hacker News new | past | comments | ask | show | jobs | submit login

Another side note is that the vibe.d devs got sick of the callback hell of nodejs[0] and made Vibe.d as a result.

[0]: https://vibed.org/features#simplicity




I love how in vibe.d you have a single callback function which can then just deal with its client with code that looks a hell of a lot like blocking code but is secretly yielding control to other connections whenever it'd block.


Callback hell was solved years ago with promises and async-await.


Actually I prefer callbacks over promises, but it can sometimes be nice to have async/await aka. pseudo-treads / co-routines or "fibers". I belive it's much easier to learn about first class functions, then to learn the concept of Monads, and Promises was rushed into the JavaScript language, while it would have been better to wait for userland libraries to settle on a standard before carving it in stone.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: