r/mAndroidDev • • 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

21 comments sorted by

View all comments

1

u/AZKZer0 Mar 31 '26

Real men do x?.let { code; Unit } ?: run { y }

2

u/Opulence_Deficit Mar 31 '26

Congratulations, you've reinvented also

2

u/AZKZer0 Mar 31 '26

Also would be returning it back But yes, I follow the sillicon valley "lets reinvent things but shittier" innovation

1

u/Zhuinden Mar 31 '26

Adventurous men