
Sign up to save your podcasts
Or
Kotlin isn't a magic bullet that prevents NullPointerExceptions.
Not at all.
What Kotlin does do is force you to think about how you want to handle your nulls. through Kotlin forcing you to think this through, the hope is that you'll avoid NullPointerExceptions. The only problem is, Kotlin has the !! operator, also known as the "Not Null Assertion Operator". This operator basically says "Hey Kotlin, trust me, I'm a pro, I know what I'm doing ... I KNOW THIS WON'T BE NULL".
This... is a code smell.
In this episode, Donn walks through why Kotlin's Not Null Assertion Operator (!!) is a code smell and what you can do to alleviate it.
Build amazing apps in Java, Kotlin or whatever tech you prefer and use Bitrise to automate your Android integration, build, test and deploy process quickly and easily. Sign up for an exquisite pair of Bitrise Branded Socks, here! https://go.bitrise.io/fragmented
5
6767 ratings
Kotlin isn't a magic bullet that prevents NullPointerExceptions.
Not at all.
What Kotlin does do is force you to think about how you want to handle your nulls. through Kotlin forcing you to think this through, the hope is that you'll avoid NullPointerExceptions. The only problem is, Kotlin has the !! operator, also known as the "Not Null Assertion Operator". This operator basically says "Hey Kotlin, trust me, I'm a pro, I know what I'm doing ... I KNOW THIS WON'T BE NULL".
This... is a code smell.
In this episode, Donn walks through why Kotlin's Not Null Assertion Operator (!!) is a code smell and what you can do to alleviate it.
Build amazing apps in Java, Kotlin or whatever tech you prefer and use Bitrise to automate your Android integration, build, test and deploy process quickly and easily. Sign up for an exquisite pair of Bitrise Branded Socks, here! https://go.bitrise.io/fragmented
1,337 Listeners
111 Listeners
3,191 Listeners
360 Listeners
402 Listeners
53 Listeners
48 Listeners
90 Listeners
2,973 Listeners
6 Listeners
2,146 Listeners
62 Listeners