|
|
|
|
|
by mcv
4494 days ago
|
|
Yes, you could do that, but it goes against how everybody has been accessing object properties for the past two decades. Quite often, you simply want person.address.street.number, and if it doesn't exist, you simply go on without it, and it doesn't matter what the exact reason is why it doesn't exist.
This is an extremely common and practical pattern, and it's hindered by layers of null pointer checks. |
|