2 ms·
This seems very similar to Python's approach, which I've been finding poor to use. I was wondering if a more pleasant approach would be to add a 'defer' keywor
by stubish 7y ago
This seems very similar to Python's approach, which I've been finding poor to use.
I was wondering if a more pleasant approach would be to add a 'defer' keyword to return a future from an async call, and have the default call be to await and return the result (setting up a default scheduler if necessary). Requiring the await keyword to be inserted in the majority of locations seems poor UX, as is requiring callsites to all be updated when you update your synchronous API to async.