Search

Home > Fragmented - Android Developer Podcast > 176: Kotlin's !! Operator is a Code Smell
Podcast: Fragmented - Android Developer Podcast
Episode:

176: Kotlin's !! Operator is a Code Smell

Category: Technology
Duration: 00:15:59
Publish Date: 2019-09-30 00:00:00
Description:

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.

Sponsor

This episode is sponsored by Bitrise

Build and operate better apps, faster with Bitrise.

Learn more about Bitrise

Contact

Total Play: 0

Users also like

300+ Episodes
Android Deve .. 40+     2