Comment by mstade
4 years ago
This is exactly how I remember it working in the language I mention (which, by the way, is called hyperscript[1].) The semantics where flipped such that you'd explicitly mark calls or functions as async, rather than await, if you wanted them to run asynchronously.
I run into subtle bugs all the time due to missing awaits, it's incredibly frustrating.
[1]: https://hyperscript.org/posts/2021-04-06-aysnc-transparency-...
> I run into subtle bugs all the time due to missing awaits, it's incredibly frustrating.
If you use TS, ESLint's `no-floating-promises` rule (or the equivalent in other linters) is _such_ a requirement
That assumes all promise-generating code can be and is properly annotated, though.
Typescript will cover this!
2 replies →