5 ms·
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 e
by mstade 5y 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-in-practice/ https://hyperscript.org/posts/2021-04-06-aysnc-transparency-...
- williamdclt 5y ago> 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
- masklinn 5y agoThat assumes all promise-generating code can be and is properly annotated, though.
- yunyu 5y agoTypescript will cover this!
- masklinn 5y agoTypescript lets you call into un-annotated libraries or annotate things as `any` or whatever.
- tekknik 5y agoYou can cover this with eslint: https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-unsafe-assignment.md https://github.com/typescript-eslint/typescript-eslint/blob/...