When in a conversation with other developers, what do I call the !!
operator?
In Kotlin, the ?:
is called the Elvis operator
These sources don't say what the name of !!
is:
Looking online, the generic term for !!
is double bang. Do I use the same for Kotlin even though swift's !
operator is called forced unwrapping (Note: the !
in swift is similar to Kotlin's !!
.)
What I'm specifically looking for:
!!
operation that Kotlin developers can understandThe Kotlin documentation refers to it as the not-null assertion operator
.
Personally, I call it the hold my beer operator
.
I like to say "non-null asserted call" for things like
a!!.length
that is also how it is shown in the Android studio ALT+ENTER context menu.
Makes sense to me because that sums up what it is actually doing.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With