I've always liked the idea of using coroutines and tail-calls to represent state machines. Each state is a function and transitions into another by simply tail-calling it. Input/Output is done by yielding the coroutine.
Sadly, not many languages have the tools needed for this: Tail call elimination and stackful coroutines.
Coroutines in Kotlin use threading strategies, so for example you can have a common pool for greenthreading, you can have a main thread for UI, a dedicated thread for IO, or no threading for environments like web that don't support it. Threads are a part of it, but kotlin coroutines at their core is really just a way to do parallel work without callbacks.
It's not really a debate. If they want to call their green threads coroutines, that's their choice. I just find it confusing, because I'm used to coroutines being actual coroutines.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I've always liked the idea of using coroutines and tail-calls to represent state machines. Each state is a function and transitions into another by simply tail-calling it. Input/Output is done by yielding the coroutine.
Sadly, not many languages have the tools needed for this: Tail call elimination and stackful coroutines.
Yeah, I didn't mention coroutines/generators because the article would be twice as long!
<3 Kotlin
I've had a quick look at kotlin "coroutines" and they seem more like light threads to me than actual coroutines.
Coroutines in Kotlin use threading strategies, so for example you can have a common pool for greenthreading, you can have a main thread for UI, a dedicated thread for IO, or no threading for environments like web that don't support it. Threads are a part of it, but kotlin coroutines at their core is really just a way to do parallel work without callbacks.
That's... not what coroutines are though...
Ok, get into that debate with them then.
It's not really a debate. If they want to call their green threads coroutines, that's their choice. I just find it confusing, because I'm used to coroutines being actual coroutines.