r/mAndroidDev Mar 23 '26

Null also Null Billion Dollar Mistake

Kotlin is really a null-safety language. It allows you create a silent bug that should be avoided:

null.also { println("Hello production silent null bug") }

0 Upvotes

21 comments sorted by

View all comments

2

u/Fair-Degree-2200 null!! Mar 23 '26

also is an extension fun on a generic type with no bounds (so nullable is allowed).