spicyspiders
09/19/2019, 2:27 AMpeople: List<Person>?
is it safer to do people: List<Person?>?
instead? i.e. people field can be null and also list containing null or empty?Amirul Zin
09/19/2019, 2:38 AMspicyspiders
09/19/2019, 3:08 AMpeople: List<Person?>?
-- but am I correct in my assumption that this is the way to let kotlin know the whole field can be null or list of null is also valid?Amirul Zin
09/19/2019, 5:33 AMtddmonkey
09/19/2019, 7:34 AMList<Person>
so the rest of my domain doesn’t have to worry about it. It’s a one liner to convert List<Person?>?
to List<Person>
and saves null-safe dereferencing everywhere you need to use itMatteo Mirk
09/19/2019, 8:27 AMspicyspiders
09/20/2019, 1:05 AM