https://kotlinlang.org logo
#announcements
Title
# announcements
o

Olekss

10/03/2017, 10:38 AM
@Czar I get the receiver version of run. But what is simple "run" which just executes block?
c

Czar

10/03/2017, 10:49 AM
Again, syntactic sugar. Consider this example:
Copy code
val someVal = somethingNullable ?: run {
	//construct alternative for somethingNullable
}
a

arekolek

10/04/2017, 7:27 AM
I’d say it’s more than syntactic sugar, because it also changes what
this
is inside the block
c

Czar

10/04/2017, 7:41 AM
Yes, it does, I meant it in terms of why not how.
2 Views