---
title: ExpressibleByNilLiteral
framework: swift
role: symbol
role_heading: Protocol
path: swift/expressiblebynilliteral
---

# ExpressibleByNilLiteral

A type that can be initialized using the nil literal, nil.

## Declaration

```swift
protocol ExpressibleByNilLiteral : ~Copyable, ~Escapable
```

## Overview

Overview nil has a specific meaning in Swift—the absence of a value. Only the Optional type conforms to ExpressibleByNilLiteral. ExpressibleByNilLiteral conformance for types that use nil for other purposes is discouraged.

## Topics

### Initializers

- [init(nilLiteral:)](swift/expressiblebynilliteral/init(nilliteral:).md)

## Relationships

### Conforming Types

- [Optional](swift/optional.md)

## See Also

### Value Literals

- [ExpressibleByIntegerLiteral](swift/expressiblebyintegerliteral.md)
- [ExpressibleByFloatLiteral](swift/expressiblebyfloatliteral.md)
- [ExpressibleByBooleanLiteral](swift/expressiblebybooleanliteral.md)
- [StaticBigInt](swift/staticbigint.md)
