r/mAndroidDev • u/programadorthi • Mar 23 '26
Billion Dollar Mistake Null also Null
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
View all comments
Show parent comment
1
u/programadorthi Mar 31 '26
Since you're forced to check for null or get a segmentation fault. In Kotlin example the code just keep running "silently". Nor in compiler time neither in runtime.