Skip to content

Commit c08a9b3

Browse files
committed
Update CHANGELOG
1 parent 692b13d commit c08a9b3

File tree

3 files changed

+14
-7
lines changed

3 files changed

+14
-7
lines changed

CHANGELOG.md

+11
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,23 @@ This release no longer supports WERL (a graphical user interface for the Erlang
88

99
#### Elixir
1010

11+
* [CLI] Add experimental PowerShell scripts for `elixir`, `elixirc`, and `mix` on Windows. Those provide a safer entry point for running Elixir from other platforms
12+
* [Enumerable] Add `Enum.product_by/2` and `Enum.sum_by/2`
13+
* [Exception] Add `MissingApplicationsError` exception to denote missing applications
14+
* [Kernel] Update source code parsing to match [UTS #55](https://www.unicode.org/reports/tr55/) latest recommendations. In particular, mixed script is allowed in identifiers as long as they are separate by underscores (`_`), such as `http_сервер`. Previously allowed highly restrictive identifiers, which mixed Latin and other scripts, such as the japanese word for t-shirt, `Tシャツ`, now require the underscore as well
15+
* [Kernel] Warn on bidirectional confusability in identifiers
1116
* [Macro] Improve `dbg` handling of `if/2`, `unless/2`, and code blocks
17+
* [Process] Handle arbitrarily high integer values in `Process.sleep/1`
18+
* [String] Inspect special whitespace and zero-width characters using their Unicode representation
1219

1320
#### ExUnit
1421

1522
* [ExUnit] Support parameterized tests on `ExUnit.Case`
1623

24+
#### IEx
25+
26+
* [IEx] Add `:dot_iex` support to `IEx.configure/1`
27+
1728
### 2. Bug fixes
1829

1930
### 3. Soft deprecations (no warnings emitted)

lib/elixir/pages/references/unicode-syntax.md

+1-7
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ The characters allowed in identifiers are the ones specified by Unicode. General
1717

1818
Elixir imposes many restrictions on identifiers for security purposes. For example, the word "josé" can be written in two ways in Unicode: as the combination of the characters `j o s é` and as a combination of the characters `j o s e ́ `, where the accent is its own character. The former is called NFC form and the latter is the NFD form. Elixir normalizes all characters to be the in the NFC form.
1919

20-
Elixir also disallows mixed-scripts in most scenarios. For example, it is not possible to name a variable `аdmin`, where `а` is in Cyrillic and the remaining characters are in Latin. Doing so will raise the following error:
20+
Elixir also disallows mixed-scripts which are not explicitly separated by `_`. For example, it is not possible to name a variable `аdmin`, where `а` is in Cyrillic and the remaining characters are in Latin. Doing so will raise the following error:
2121

2222
```text
2323
** (SyntaxError) invalid mixed-script identifier found: аdmin
@@ -34,12 +34,6 @@ Make sure all characters in the identifier resolve to a single script or a highl
3434
restrictive script. See https://hexdocs.pm/elixir/unicode-syntax.html for more information.
3535
```
3636

37-
The character must either be all in Cyrillic or all in Latin. The only mixed-scripts that Elixir allows, according to the Highly Restrictive Unicode recommendations, are:
38-
39-
* Latin and Han with Bopomofo
40-
* Latin and Japanese
41-
* Latin and Korean
42-
4337
Finally, Elixir will also warn on confusable identifiers in the same file. For example, Elixir will emit a warning if you use both variables `а` (Cyrillic) and `а` (Latin) in your code.
4438

4539
That's the overall introduction of how Unicode is used in Elixir identifiers. In a nutshell, its goal is to support different writing systems in use today while keeping the Elixir language itself clear and secure.

lib/elixir/unicode/tokenizer.ex

+2
Original file line numberDiff line numberDiff line change
@@ -509,6 +509,8 @@ defmodule String.Tokenizer do
509509
end
510510
end
511511

512+
# Support script mixing via chunked identifiers (UTS 55-5's strong recommends).
513+
# Each chunk in an ident like foo_bar_baz should pass checks.
512514
defp chunks_single?(acc),
513515
do: chunks_single?(acc, @top)
514516

0 commit comments

Comments
 (0)