Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/elixir/lib/calendar/date.ex
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,7 @@ defmodule Date do
## Examples

Imagine someone implements `Calendar.Holocene`, a calendar based on the
Gregorian calendar that adds exactly 10,000 years to the current Gregorian
Gregorian calendar that adds exactly 10000 years to the current Gregorian
year:

iex> Date.convert(~D[2000-01-01], Calendar.Holocene)
Expand Down Expand Up @@ -667,7 +667,7 @@ defmodule Date do
## Examples

Imagine someone implements `Calendar.Holocene`, a calendar based on the
Gregorian calendar that adds exactly 10,000 years to the current Gregorian
Gregorian calendar that adds exactly 10000 years to the current Gregorian
year:

iex> Date.convert!(~D[2000-01-01], Calendar.Holocene)
Expand Down
4 changes: 2 additions & 2 deletions lib/elixir/lib/calendar/datetime.ex
Original file line number Diff line number Diff line change
Expand Up @@ -1922,7 +1922,7 @@ defmodule DateTime do
## Examples

Imagine someone implements `Calendar.Holocene`, a calendar based on the
Gregorian calendar that adds exactly 10,000 years to the current Gregorian
Gregorian calendar that adds exactly 10000 years to the current Gregorian
year:

iex> dt1 = %DateTime{year: 2000, month: 2, day: 29, zone_abbr: "AMT",
Expand Down Expand Up @@ -1969,7 +1969,7 @@ defmodule DateTime do
## Examples

Imagine someone implements `Calendar.Holocene`, a calendar based on the
Gregorian calendar that adds exactly 10,000 years to the current Gregorian
Gregorian calendar that adds exactly 10000 years to the current Gregorian
year:

iex> dt1 = %DateTime{year: 2000, month: 2, day: 29, zone_abbr: "AMT",
Expand Down
4 changes: 2 additions & 2 deletions lib/elixir/lib/calendar/naive_datetime.ex
Original file line number Diff line number Diff line change
Expand Up @@ -1261,7 +1261,7 @@ defmodule NaiveDateTime do
## Examples

Imagine someone implements `Calendar.Holocene`, a calendar based on the
Gregorian calendar that adds exactly 10,000 years to the current Gregorian
Gregorian calendar that adds exactly 10000 years to the current Gregorian
year:

iex> NaiveDateTime.convert(~N[2000-01-01 13:30:15], Calendar.Holocene)
Expand Down Expand Up @@ -1327,7 +1327,7 @@ defmodule NaiveDateTime do
## Examples

Imagine someone implements `Calendar.Holocene`, a calendar based on the
Gregorian calendar that adds exactly 10,000 years to the current Gregorian
Gregorian calendar that adds exactly 10000 years to the current Gregorian
year:

iex> NaiveDateTime.convert!(~N[2000-01-01 13:30:15], Calendar.Holocene)
Expand Down
4 changes: 2 additions & 2 deletions lib/elixir/lib/calendar/time.ex
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,7 @@ defmodule Time do
## Examples

Imagine someone implements `Calendar.Holocene`, a calendar based on the
Gregorian calendar that adds exactly 10,000 years to the current Gregorian
Gregorian calendar that adds exactly 10000 years to the current Gregorian
year:

iex> Time.convert(~T[13:30:15], Calendar.Holocene)
Expand Down Expand Up @@ -837,7 +837,7 @@ defmodule Time do
## Examples

Imagine someone implements `Calendar.Holocene`, a calendar based on the
Gregorian calendar that adds exactly 10,000 years to the current Gregorian
Gregorian calendar that adds exactly 10000 years to the current Gregorian
year:

iex> Time.convert!(~T[13:30:15], Calendar.Holocene)
Expand Down
2 changes: 1 addition & 1 deletion lib/elixir/pages/anti-patterns/code-anti-patterns.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ end

#### Problem

An `Atom` is an Elixir basic type whose value is its own name. Atoms are often useful to identify resources or express the state, or result, of an operation. Creating atoms dynamically is not an anti-pattern by itself. However, atoms are not garbage collected by the Erlang Virtual Machine, so values of this type live in memory during a software's entire execution lifetime. The Erlang VM limits the number of atoms that can exist in an application by default to *1_048_576*, which is more than enough to cover all atoms defined in a program, but attempts to serve as an early limit for applications which are "leaking atoms" through dynamic creation.
An `Atom` is an Elixir basic type whose value is its own name. Atoms are often useful to identify resources or express the state, or result, of an operation. Creating atoms dynamically is not an anti-pattern by itself. However, atoms are not garbage collected by the Erlang Virtual Machine, so values of this type live in memory during a software's entire execution lifetime. The Erlang VM limits the number of atoms that can exist in an application by default to *1 048 576*, which is more than enough to cover all atoms defined in a program, but attempts to serve as an early limit for applications which are "leaking atoms" through dynamic creation.

For these reasons, creating atoms dynamically can be considered an anti-pattern when the developer has no control over how many atoms will be created during the software execution. This unpredictable scenario can expose the software to unexpected behavior caused by excessive memory usage, or even by reaching the maximum number of *atoms* possible.

Expand Down