3 ms·
I used "async" long before Node too. It's one of the reasons I knew to stay away from Node. "ad-hoc implementation of async" I think you're confusing the prob
by jerf 3y ago
I used "async" long before Node too. It's one of the reasons I knew to stay away from Node.
"ad-hoc implementation of async"
I think you're confusing the problem with the solution. I solve this sort of thing in Go all the time. This is literally what I was doing yesterday. It's fine in that context. You had to reach for async because it was the only option in your context, not because it was the best choice. Async as it is conceived of today was a hack for dynamic scripting languages that basically had no other option. They "won" there because the environments simply couldn't support any other solution, not because they outcompeted anything.
- osmarks 3y agoGo is internally doing async-like cooperative multitasking. You just don't see it because they actually integrated it into the language well.
- yencabulator 3y agoAs jerf said in a parent comment, > It's just you manually doing what the compiler ought to be doing for you,
- jacquesm 3y agoWhich is the proper way of doing it. As soon as you expose all that plumbing a whole generation of inexperienced programmers are going to use it to build their sandcastles with and then you can spend the next two decades on the cleanup. Such stuff should be implemented once and made bulletproof rather than to give everybody a box with interesting shiny parts that will explode when used wrong.