liveBook · Manning

Nullable type

A nullable type is a type whose values may be either a value of the underlying type or an explicit representation of absence, such as null.

How 3 Manning books explain it

Kotlin in Action, 2E

A nullable type is a type whose values may include null and whose unsafe operations are restricted by the type system.

How it is used
Prevents potential NullPointerExceptions by making absent values explicit in Kotlin APIs and expressions.
How deep it goes
Develops syntax, checks, operators, collections, generics, nullable extensions, primitive representation, and Java overrides.
Examples
Uses string-length functions, optional ages, parsed-number lists, nullable receiver extensions, and Java interface implementations.
What you can do after
Apply nullable types and Kotlin null-handling operators to prevent unsafe dereferences and model absent values.

Read how Kotlin in Action, 2E explains nullable type →

Pro ASP.NET Core 7, Tenth Edition

A nullable parameter type is a parameter type that permits a null value to represent the absence of a supplied argument.

How it is used
Distinguishes missing ASP.NET Core request values from supplied values and permits unassigned form properties to participate in validation.
How deep it goes
Works through compiler warnings, array declarations, and a controller query without detailing model-binding internals.
Examples
Uses nullable product arrays, an optional controller ID tested with two URLs, and an RSVP attendance field.
What you can do after
Apply it via ASP.NET Core model binding to distinguish omitted IDs from supplied values and detect an unanswered required choice.

Read how Pro ASP.NET Core 7, Tenth Edition explains nullable type →

F# in Action: A Revised Edition of Get Programming with F#

Nullable<T> is a .NET value type that represents either a value of a non-nullable value type or the absence of such a value.

How it is used
Models absent values for .NET value types and supports safe conversion between .NET representations and F# options.
How deep it goes
Explains the modeling problem, historical solution, boundary conversions, and preferred F# usage without detailing Nullable<T> internals.
Examples
Uses magic integer values, SQL-originated missing numbers, and F# conversions for empty or populated Nullable values.
What you can do after
Apply it via F# Option conversion functions at .NET boundaries while keeping domain modeling centered on options.

Read how F# in Action: A Revised Edition of Get Programming with F# explains nullable type →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.