3 ms·
Async code is a good way to achieve some level for performance in I/O bound workloads, but it's a pain for the programmer. Because of that I wouldn't say that i
by fooyc 5y ago
Async code is a good way to achieve some level for performance in I/O bound workloads, but it's a pain for the programmer. Because of that I wouldn't say that it's necessarily a good thing that JS is async-first.
In my opinion, high level languages should not expose async primitives to the programmer - this should be abstracted away by the language and its runtime. Go is doing this (all I/O is async under the hood), and it's awesome: You can write synchronous/sequential code and get the performances of async. I would love if other languages copied that.
- Klathmon 5y ago>In my opinion, high level languages should not expose async primitives to the programmer Just another reason why the "each request gets a process" architecture can work well. You generally don't need to worry about async stuff in PHP, because your request has the whole process to itself.
- afiori 5y agoBefore being async as in async/await Javascript was also async as in having an external event loop and being event driven.
- fooyc 5y agoYup. Go too, but the programmer doesn't need to know it.