stdlib additions and deprecations in 1.5 are very ...
# stdlib
l
stdlib additions and deprecations in 1.5 are very good! 👍
w
Btw I’m curious about
firstNotNullOf
, am I missing something but there’s no
firstNotNull()
?
first { it != null }
is kind of tedious and I’d probably use
firstNotNull()
more often than
firstNotNullOf()
👍 3
l
firstNotNullOf(a, b, c)
is more efficient than any other alternatives though
w
What’s
a, b, c
here? I thought
firstNotNullOf
accepts a selector 🤔 I’m just saying I’ll probably have a lot of
firstNotNullOf { it }
🙂
But yeah even that will already be more efficient than the alternatives
l
Or you're right, I had a misconception of its signature. I was thinking about a, b, and c being properties in scope of nullable types (possibly coming from several function calls, parameters or members)
w
That’d be
a ?: b ?: c
no? 😄
l
Yeah, you're totally right 😄