Async model is not just "implementation details". Your A1()
example doesn't exist in stackless coroutine model, which is the only choice for The Swift Language.
Discovering await
is not enough. In stackless coroutine model, the compiler really can't do anything but block the current thread in a normal function, which defeat the whole purpose of coroutine. Otherwise the call stack will be destroyed as await
returns.