3 ms·
Good point, I still have to check nils on some stuff in Lua, but way way less than I do in my Python day job! I liked Kotlin's null-handling when I worked in i
by ok_dad 4y ago
Good point, I still have to check nils on some stuff in Lua, but way way less than I do in my Python day job!
I liked Kotlin's null-handling when I worked in it because there were some tools there to handle nulls in a reasonable manner. I think the `something?.prop` would do null checking on `something` before trying to access `prop` and then you could use `?:` (Elvis operator, haha) to check a null and do something if it was null, like `something ?: executed_if_null` and combining those would effectively deal with nulls in a simple and readable way.