diff --git a/lib/elixir/lib/calendar/date.ex b/lib/elixir/lib/calendar/date.ex index 0fb91ebce07..8d57dd8e784 100644 --- a/lib/elixir/lib/calendar/date.ex +++ b/lib/elixir/lib/calendar/date.ex @@ -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 10 000 years to the current Gregorian year: iex> Date.convert(~D[2000-01-01], Calendar.Holocene) @@ -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 10 000 years to the current Gregorian year: iex> Date.convert!(~D[2000-01-01], Calendar.Holocene) diff --git a/lib/elixir/lib/calendar/datetime.ex b/lib/elixir/lib/calendar/datetime.ex index b945c0ab99b..05887465135 100644 --- a/lib/elixir/lib/calendar/datetime.ex +++ b/lib/elixir/lib/calendar/datetime.ex @@ -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 10 000 years to the current Gregorian year: iex> dt1 = %DateTime{year: 2000, month: 2, day: 29, zone_abbr: "AMT", @@ -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 10 000 years to the current Gregorian year: iex> dt1 = %DateTime{year: 2000, month: 2, day: 29, zone_abbr: "AMT", diff --git a/lib/elixir/lib/calendar/naive_datetime.ex b/lib/elixir/lib/calendar/naive_datetime.ex index 76e1337b97b..338cd62d8e6 100644 --- a/lib/elixir/lib/calendar/naive_datetime.ex +++ b/lib/elixir/lib/calendar/naive_datetime.ex @@ -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 10 000 years to the current Gregorian year: iex> NaiveDateTime.convert(~N[2000-01-01 13:30:15], Calendar.Holocene) @@ -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 10 000 years to the current Gregorian year: iex> NaiveDateTime.convert!(~N[2000-01-01 13:30:15], Calendar.Holocene) diff --git a/lib/elixir/lib/calendar/time.ex b/lib/elixir/lib/calendar/time.ex index e3b4fce96c3..0abca3f4805 100644 --- a/lib/elixir/lib/calendar/time.ex +++ b/lib/elixir/lib/calendar/time.ex @@ -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 10 000 years to the current Gregorian year: iex> Time.convert(~T[13:30:15], Calendar.Holocene) @@ -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 10 000 years to the current Gregorian year: iex> Time.convert!(~T[13:30:15], Calendar.Holocene) diff --git a/lib/elixir/pages/anti-patterns/code-anti-patterns.md b/lib/elixir/pages/anti-patterns/code-anti-patterns.md index 921717d946c..d4bfebc0fed 100644 --- a/lib/elixir/pages/anti-patterns/code-anti-patterns.md +++ b/lib/elixir/pages/anti-patterns/code-anti-patterns.md @@ -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.