6/16/2023 0 Comments Kotlin null checkConsider, for example, storing a reference to a view in a property. Still, Kotlin has to live in the world where Java was king, and on Android the Activity lifecycle further complicates things. Less boilerplate, more expressive code and, yes, it is null safe – if you choose the path of avoiding torture. Many Android developers find refuge in Kotlin, a modern programming language that eliminates a lot of pain and suffering. Java does not protect you from the “billion dollar mistake” – the null pointer is lurking everywhere. “It’s so safe you won’t believe it!” you utter, but you are not sure anymore. “Is it safe?” the sadistic voice is relentless. “Is it safe?” forcing you to check whether your variables are null. “Is it safe?” the massive code base keeps asking you. You start the development sprint full of energy, but the ancient curse of Java bogs you down and you realize you are in for a marathon.
0 Comments
Leave a Reply. |