The nullable tag is for issues relating to nullable members or types. A null is used to represent a missing or unknown value.
A data member is nullable
if it can have the special value of NULL
, instead of their common range of possible values. Nullable types are a feature of some statically-typed programming languages.
.NET
In .net, the built-in generic type System.Nullable<T>
allows the programmer to use value types like int
or DateTime
with a value of null
. Several .NET languages have a special syntax for declaring Nullable
:
- In c#,
int?
is an alias forSystem.Nullable<System.Int32>
- In vb.net,
Integer?
is an alias forSystem.Nullable(Of System.Int32)
SQL
Null
is a special marker used in SQL to indicate that data value do not exist in the database. Its proper use ensures various statistical aggregate functions perform correctly.
See more on Wikipedia.
D
The typecons
module in package std
has a templated struct - Nullable
- for wrapping values types and allowing them to appear to have a null value (as in C#). Restriction is that the type must be able to be instantiated with T var
or T var = T.init
, where T
represents the type being used.