Re: C# Nullable types
- From: "Jon Skeet [C# MVP]" <skeet@xxxxxxxxx>
- Date: 5 Apr 2007 07:42:26 -0700
On Apr 5, 2:19 pm, "Scott M." <s...@xxxxxxxxxxxxx> wrote:
Hmmm, again, to my knowledge the concepts of "undefined", "unknown"," not
applicable" have never been identified with "null" in SQL or anywhere else.
When I mark a filed in SQL as "nullable", I am not doing it because I don't
know what value the user may want to put into the field. On the contrary, I
do it because I'm letting the user not put any value at all into the field.
Again "undefined", "unknown"," not applicable" does not equal "null". I
think this is super-important to be clear on, because "null" has a special
purpose and meaning and the minute you try to attach a meaning that is
something similiar, but not the same, to it, you confuse the issue and make
it more complicated than it need be.
Note that the same issue of confusion and complicated is true when
mixing the NULL of a database with the null of C#.
For instance, nulls are equal to each other in C#/.NET, but not in a
database (where you need IS NULL or whatever).
I think it's worth leaving databases out of the discussion, personally
- at least until we get into why nullable types were a widely
requested feature.
Jon
.
- References:
- Re: C# Nullable types
- From: Patrice
- Re: C# Nullable types
- From: Scott M.
- Re: C# Nullable types
- From: Patrice
- Re: C# Nullable types
- From: Scott M.
- Re: C# Nullable types
- From: Patrice
- Re: C# Nullable types
- From: Scott M.
- Re: C# Nullable types
- Prev by Date: Re: C# Nullable types
- Next by Date: Re: C# Nullable types
- Previous by thread: Re: C# Nullable types
- Next by thread: Re: C# Nullable types
- Index(es):
Relevant Pages
|
Loading