Re:Flutter: Futures, Isolates, Event Loop
by ridiculous_fish on Wednesday January 23, 2019 @05:26AM
(#18977127)
Why not just some generic function T -> Future<T>?
It sounds like the async keyword allows for a particular implicit type conversion within the function body, but on return statements only. That's a pretty thin justification for a keyword.
For example:
If the function is marked async, the return value should be Future<int>.If you allow a non-async method use await, you get into this situation: