3 ms·
I don't like using null generally, because it results in having to use a bunch of unwieldy if statements. It's much nicer to have the notion of an "empty" objec
by rectangletangle 12y ago
I don't like using null generally, because it results in having to use a bunch of unwieldy if statements. It's much nicer to have the notion of an "empty" object, which supports the same interface as a normal object. Python's lists are a good example of this, as opposed to passing around a bunch of lists or nulls, pass around empty or occupied lists. Both of course support the same interface. This negates the need for a bunch of if statements, which are cumbersome and easy to forget.