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

kingsley

06/02/2017, 11:24 AM
Either one works. I prefer the second though, but it could also be context dependent
j

janvladimirmostert

06/02/2017, 11:25 AM
kingsley: there’s not like something in the standard lib that assigns a value only if it’s null ?
k

kingsley

06/02/2017, 2:27 PM
Isn't that what the elvis operator is for? Or do you mean STD lib functions, like
takeIf
and
takeUnless
?
j

janvladimirmostert

06/02/2017, 6:29 PM
The elvis operator is probably good enough, takeIf and takeUnless seems like they make it more complicated than it needs to be .
k

kingsley

06/02/2017, 7:31 PM
💯
2 Views