3 ms·
I ran into a very frustrating but unsurprising Null case last week: a value on the client having three states: "not retrieved yet", "no value", and "value". Ja
by Waterluvian 7y ago
I ran into a very frustrating but unsurprising Null case last week: a value on the client having three states: "not retrieved yet", "no value", and "value".
Javascript's ugly parts called to me, "use undefined!" but that's such a bear trap. I ended up with a separate enum of the possible states for the value's variable.