2 ms·
I have written Ruby, Elixir, and Typescript on Nodejs. I have yet to see a good reason for async/await, other than syntax sugar on a flawed language architectu
by hosh 2y ago
I have written Ruby, Elixir, and Typescript on Nodejs.
I have yet to see a good reason for async/await, other than syntax sugar on a flawed language architecture. The very thing people like about Nodejs (async reactor), creates a lot of problems in production web and data pipeline code.
As an aside, Elixir’s Task.async and Task.await are function helpers that work with message passing primitives. Code execution can be truly suspended, and messages are queued. Javascript’s async/await queues code execution rather than messages, and I think that leads to error prone code by design.