I do wish async would go away and never come back -- in every language. Some days I long for the NMI: non-maskable interrupt.
I have been coding since the late 70s -- the latter half of the last century. After all I have seen, async feels wrong.
I have been coding since the late 70s -- the latter half of the last century. After all I have seen, async feels wrong.
In pseudocode:
1. var logResults = Background writeLogServiceStarted() // Sent to different machine
2. var authoResults = Background performAuthorisation() // Perform by 3rd party
3. var userSettings = Background getUserSettings(request.currentUser) // Stored in DB
4. var results = Background executeQuery(request.query, authoResults) // Different DB
5. var response = Background generateResponse(results, userSettings)
6. wait (logResults, response)
7. transmitResponse (response)
The current async/await solution doesn't really make this as clear as the above though: The code is littered with some form of unwrapping/wrapping at every step hiding the actual intention, the call stack is marked as async making it hard to figure out where and when a sync function can make a call, etc.