https://kotlinlang.org logo
#feed
Title
# feed
I will appreciate any feedback
s

Spike Baylor

11/06/2018, 7:42 PM
as someone who hasn't gotten into coroutines at all yet, i'd recommend putting in a comparison of how this is executed and used as well.
👍 1
o

oshai

11/06/2018, 7:44 PM
The usage is similar, it has similar functionality. api is different and that is what I tried to emphasize
c

Chris Cunningham

11/06/2018, 7:45 PM
you only really show where they can be useful but nothing about usage
o

oshai

11/06/2018, 7:45 PM
I will try to give some more context
what do you mean by usage?
c

Chris Cunningham

11/06/2018, 7:48 PM
well just more details, like communication between coroutines and stuff like blocking vs no blocking ones
s

Spike Baylor

11/06/2018, 7:48 PM
it seems your target audience is someone who doesn't know much about coroutines or when/how to use them, and then you only show half of how to use them. I'm only going to write this part of the code once, but i'm going to have to use this function many times. Showing that its both easier to write/understand on the implementation side AND easier to write/understand on the calling side is important to someone who doesn't know anything about coroutines
c

Chris Cunningham

11/06/2018, 7:48 PM
i am new to them, but am assuming suspend in the method def is similar to await of other langauges
o

oshai

11/06/2018, 7:57 PM
Thanks, I added some more context at the beginning, hope it helps. generally, I wanted to focus on the implementation and not the usage. However, I will also add some references to how coroutines work.
t

thevery

11/06/2018, 8:10 PM
@oshai it is totally unclear why you need some suspend/async calls here
o

oshai

11/06/2018, 8:12 PM
ok, I will try to clear that up as well
2 Views