3 ms·
async is part of the method signature, the public facing part of the method. But it controls an implementation detail, namely whether the function body may use
by ridiculous_fish 8y ago
async is part of the method signature, the public facing part of the method. But it controls an implementation detail, namely whether the function body may use await (as you say asynchronous functions are not required to use await).
I found a link [1] that described async as a compatibility affordance in C# 5: legacy code may use await as a variable name, so async opts into the contextual await keyword. But Dart doesn't have such legacy, so the keyword doesn't seem as well motivated.
https://blogs.msdn.microsoft.com/ericlippert/2010/11/11/asynchrony-in-c-5-part-six-whither-async/ https://blogs.msdn.microsoft.com/ericlippert/2010/11/11/asyn...