S
Scott M.
Again, you are getting phillisophical, rather than being pragmatic. I have
found that you will twist any argument in any way to prove your point.
Your agument could easily be analogous to the universe's size being
infinate. But does the universe have a particular value for its size? You
argue "Yes" - Its size is infinate, I argue "No" - there is no particular
size, which is expressed by saying infinate.
null is just a word - it's meaning is widely known to be "no value".
You can twist your words in any way that you like, but all you are doing is
making this way more complicated than it need be.
I know you know (despite your public stance here) that:
string x = null;
means that x should be initialized to no particular value and we tell the
compiler that by using the language specific word called "null". In VB,
we'd use the language specific keyword "Nothing".
But, I also know you know that:
string x;
is an unitialized variable. The compiler needs to make this distrinction
(between intentionally not specifying a value and perhaps not setting a
value by mistake), so we are given a keyword to state our intentions as the
developer. In other words, null is just a word we use to tell the compiler
what our intentions are. In C#, uninitialized variables are mostly not
allowed (because of the DAR), but we can pass compilation but stating our
intentions:
string x = null;
I am saying that I don't want x to have any value and I am "ok" with that.
The compiler then says, "ok, as long as you use x correctly and you know
what you are doing".
found that you will twist any argument in any way to prove your point.
Your agument could easily be analogous to the universe's size being
infinate. But does the universe have a particular value for its size? You
argue "Yes" - Its size is infinate, I argue "No" - there is no particular
size, which is expressed by saying infinate.
null is just a word - it's meaning is widely known to be "no value".
You can twist your words in any way that you like, but all you are doing is
making this way more complicated than it need be.
I know you know (despite your public stance here) that:
string x = null;
means that x should be initialized to no particular value and we tell the
compiler that by using the language specific word called "null". In VB,
we'd use the language specific keyword "Nothing".
But, I also know you know that:
string x;
is an unitialized variable. The compiler needs to make this distrinction
(between intentionally not specifying a value and perhaps not setting a
value by mistake), so we are given a keyword to state our intentions as the
developer. In other words, null is just a word we use to tell the compiler
what our intentions are. In C#, uninitialized variables are mostly not
allowed (because of the DAR), but we can pass compilation but stating our
intentions:
string x = null;
I am saying that I don't want x to have any value and I am "ok" with that.
The compiler then says, "ok, as long as you use x correctly and you know
what you are doing".