2 ms·
By the same token, being async doesn't color a function since you can always blocking-wait on the returned promise. But then the callers of that function can't
by int_19h 2y ago
By the same token, being async doesn't color a function since you can always blocking-wait on the returned promise. But then the callers of that function can't use it async.
Similarly with Context, if your function calls other functions with Context but always passes in Background(), you deprive your callers of the ability to provide their own Context, which is kinda important. So in practice you still end up adding that argument throughout the entire call hierarchy all the way up to the point where the context is no longer relevant.