Hacker News new | ask | show | jobs
by marssaxman 3868 days ago
The main reason asynchronous programming exists is that useful programs generally have to communicate with some part of the outside world, which does not share the CPU's clock. To a very near approximation, all device I/O is fundamentally asynchronous; synchronous I/O is either an abstraction created by a multitasking operating system, a spectacular waste of CPU time, or a careful optimization used in certain circumstances on an embedded device. Yes, you really can async your entire application; having learned to code on primitive home computers in the '80s, I generally prefer to.