Hacker News new | ask | show | jobs
by czeidler 3320 days ago
Kotlin 1.1 supports coroutines what IHMO makes concurrency in a GUI much nicer. For example, it has C# like async/await methods; but more flexible...
2 comments

Keep in mind coroutines is very much experimental, things will change.
So what does it do better than C# 7's async/await?
Its more flexible and customizable, e.g. works with RxJava, CompletableFuture, JavaFX, Android... Moreover, you have more control where a coroutine is executed. https://kotlinlang.org/docs/reference/coroutines.html
Have you by any chance seen that I specifically mentioned version 7 of C#?

Which allows full control how async/await works, kind of like on the upcoming C++ co-routines, where async/await become syntactic sugar for blessed data structure.

EDIT: Should have provided the actual information.

The feature as introduced in C# 7 is called "Generalized async return types".

https://github.com/dotnet/docs/issues/1756