uhe
07/27/2017, 12:26 PMfor (it in channel) {
if(it.sth()){
doSth()
} else {
break
}
}
rafal
07/27/2017, 12:27 PMfor
in "consumer" code 😛 I prefer lambda-like approach e.g. forEach{}
groostav
07/27/2017, 4:14 PMforeach
with it
doesnt require the varName in
preamble. For some tasks its quite nicegroostav
07/27/2017, 4:14 PMforeach { it
makes multiple references to it
or is a multi-liner. Then switch that bad-boy out for a for-loop
or at least a named argument. but this is really #codingconventionsferoz_baig
07/27/2017, 6:42 PMrogeralsing
07/27/2017, 9:02 PMfuture { theFuture }.await()
e.g. if there is some extension that lets me do this out of the box instead of first turning the future into a deferred and then awaiting the deferredkingsley
07/27/2017, 9:11 PMrogeralsing
07/27/2017, 9:16 PMrogeralsing
07/29/2017, 8:00 PMrogeralsing
07/29/2017, 8:00 PMrogeralsing
07/29/2017, 8:01 PMrogeralsing
07/29/2017, 8:04 PMelizarov
07/29/2017, 8:36 PMrogeralsing
07/29/2017, 8:37 PMelizarov
07/29/2017, 8:45 PMrogeralsing
07/29/2017, 9:10 PMuser
07/29/2017, 9:12 PMhttps://kotlinlang.slack.com/files/U0CG5M9T4/F6ERK19U0/pasted_image_at_2017_07_29_11_09_pm.png▾
user
07/29/2017, 9:17 PMhttps://kotlinlang.slack.com/files/U0CG5M9T4/F6ERK19U0/pasted_image_at_2017_07_29_11_09_pm.png▾
user
07/29/2017, 9:18 PMhttps://kotlinlang.slack.com/files/U0CG5M9T4/F6ERK19U0/pasted_image_at_2017_07_29_11_09_pm.png▾
elizarov
08/03/2017, 4:00 PMkirillrakhman
08/03/2017, 6:02 PMkirillrakhman
08/03/2017, 6:03 PMawait
in C# 😄jw
08/05/2017, 2:52 AMelizarov
08/05/2017, 3:19 AMjw
08/05/2017, 3:22 AMelizarov
08/05/2017, 3:30 AMsuspendCoroutine
and startCoroutine
are there so you can go and write Promise.await extension and async builder. But you have to write them. There is no launch
or async
out of the box.jw
08/05/2017, 3:32 AMelizarov
08/05/2017, 3:40 AMjw
08/05/2017, 3:40 AM