4 ms·
I understand where you're coming from. But, how would this be any more confusing than the fact that using yield instead of return in Python turns a function in
by actually_a_dog 5y ago
I understand where you're coming from. But, how would this be any more confusing than the fact that using yield instead of return in Python turns a function into a generator? That just seems like a pretty thin justification for not allowing await without async.
- nicoburns 5y agoI mean JavaScript makes the same decision here as well. To use yield you must define a generator using "function*" rather than a function using "function" exactly because it's confusing. Is it really so hard to to type `async`?
- actually_a_dog 5y agoThat's not a justification. Maybe JS used the same flawed reasoning?