3 ms·
> Knowing ahead of time which functions are async is a feature. > It's a big neon sign that says "hey, this function call is expensive" Async and expensive ar
by dragonwriter 2y ago
> Knowing ahead of time which functions are async is a feature.
> It's a big neon sign that says "hey, this function call is expensive"
Async and expensive aren't the same thing.
> Also, a nitpick - you can call async functions from sync ones, you just can't access the return value.
That's a quirk of the particular async/await implementation in JS and not generally true of colored-function implementations. (Actually, since async/await is sugar for promises, you can actually, I’m pretty sure, both call and use syntactically async functions from ones which are syntactically not-async if you really want to, the code is just ugly.