Re:Rust’s async isn’t colored
by mywittyname on Thursday March 11, 2021 @02:14PM
(#26427810)
Function coloring is bad because, as you say, the two function call types are massively different abstractions, while being almost interchangable. If two things are massively different, they shouldn't be interchangable.
Javascript handled async in probably the worst possible way. So now, effectively, everybody writes exclusively async functions, and calls them with await, regardless of whether it is necessary, because the introduction of an async call anywhere in the call stack will require every function in that stack to be changed to async in order to use the damn await keyword. And that change can have implications all over the codebase.
It looks like rust managed to avoid that tomfoolery by not introducing such a stupid rule.
Javascript handled async in probably the worst possible way. So now, effectively, everybody writes exclusively async functions, and calls them with await, regardless of whether it is necessary, because the introduction of an async call anywhere in the call stack will require every function in that stack to be changed to async in order to use the damn await keyword. And that change can have implications all over the codebase.
It looks like rust managed to avoid that tomfoolery by not introducing such a stupid rule.