> Most languages with async do not provide this capability.
Those where async is syntax sugar for something else (e.g., JavaScript, Python, I forget if C# qualifies this way) allow hiding; you don't need annotation to call an async function, you only need it if you choose to use async syntax in the calling function.
> you don't need annotation to call an async function, you only need it if you choose to use async syntax in the calling function.
The proposed thing is "I want to get a function, and call it, and use the result, and if it is effectful in a way then I am effectful in that way, and if it is not then I am not" where "the result" is defined (among other things) as the value of the expression that appears in a return statement in the body of the function. Redefining "the result" to be some object representing a continuation or whatever is missing the point.
The lack of async-hiding in JavaScript is why the original "What Color is Your Function?" blog post exists.
The two scenarios are the same, yet in a colored functions language f' will need to be annotated if r does, for example io.
The way I see it, a language should either allow 'closing' over the color (or effect or capability, or whatever) hiding it, so that f' doesn't beed to care about the details of r; or it should provide enough of polymorphic behaviour so that f' the signature of f' can be inferred from that of r.
Most languages with async do not provide this capability.