|
|
|
|
|
by zigzag312
1445 days ago
|
|
I completely agree. I tried to explain basically the same thing as you, but it seems there is some ambiguity in my example I didn't intend. Comparing two nullable/option values when both are in a "null state" will return true in most languages. Which, to me, is the most logical result as they have the same state. So, if you want to check if two people actually live on the same street, it's not enough to check p1.street == p2.street, but you need to also check that at least one of the streets is not null. Two nulls would return true, but if equality returns true and we know that one of the streets isn't null, we know we are comparing actual street values (not null states). Sadly, in SQL, NULL=NULL result is not true, but NULL. |
|