Skip to content

Add nil as documented :name option for GenServer.start_link - #15187

Merged
josevalim merged 1 commit into
elixir-lang:mainfrom
wmnnd:genserver-nil-name
Mar 12, 2026
Merged

Add nil as documented :name option for GenServer.start_link#15187
josevalim merged 1 commit into
elixir-lang:mainfrom
wmnnd:genserver-nil-name

Conversation

@wmnnd

@wmnnd wmnnd commented Mar 12, 2026

Copy link
Copy Markdown
Contributor

Hey folks, this is just a tiny documentation improvement.

When explicitly passing nil as the :name option for GenServer.start_link, the GenServer is started without a registered name (just like if no :name option had been passed).
I found this potentially confusing since nil is technically also an atom and reading the current version of the docs might lead someone to believe it might be possible to register a GenServer with the atom name nil.

@josevalim
josevalim merged commit 28ffbcf into elixir-lang:main Mar 12, 2026
15 checks passed
@josevalim

Copy link
Copy Markdown
Member

💚 💙 💜 💛 ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants