|
|
|
|
|
by rskar
2238 days ago
|
|
Fun factoid, VBA/VB6 dichotomizes between the "NULL" of value (keyword Null) versus the "null" of reference (keyword Nothing). Dim x
x = Null
Debug.Print "x", x
Debug.Print "x = x", x = x
Debug.Print "x <> x", x <> x
Debug.Print "x = 0", x = 0
Debug.Print "0 = x", 0 = x
Debug.Print "0 + x", 0 + x
(Yep, all of the above result in Null.) Dim y
y = Nothing
Debug.Print "y", y
(That one results in an "Object variable not set" error.) |
|
And then, I was using either Power Automate or SharePoint/odata and it turned out "null" does not have the "normal" null semantics, and to test for null, you simply check if something is equal to it.
I think I remember from using SQL Server that there is a option that you can treat null either way.
Microsoft has a weird relationship with null.
On the other hand, I'm sure someone has complained about Oracle's idea that empty strings are null values. And once you think about it, SQL's handling of nulls is weirdly inconsistent, because the special handling of them doesn't always apply in aggregates.
Somewhere I had a book by C.J. Date/Hugh Darwen in which I remember a rant about how nulls are a terrible offense against the true relational model.