Skip to content

Rework introduction of "textual sigils" in guides #14591

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

christhekeele
Copy link
Contributor

@christhekeele christhekeele commented Jun 19, 2025

I noticed in the sigil guide that after introducing regex sigils, we were still claiming that we "ship with three other sigils", even after release of the Calendar sigils.

This PR corrects that outdated assertion and characterizes ~s, ~c, and ~w as the "textual sigils", in reference to their utility in composing data structures from literal text without having to worry about escaping.

@@ -100,7 +100,7 @@ iex> ~S(String without escape codes \x26 without #{interpolation})
"String without escape codes \\x26 without \#{interpolation}"
```

The following escape codes can be used in strings and charlists:
The following escape codes can be used in textual sigils:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am unsure about this modification being fully accurate, but the ~w sigil seems to behave similarly to its peers (aside from stripping whitespace escape codes, which I do not find surprising behaviour).

@josevalim josevalim merged commit 66753a8 into elixir-lang:main Jun 19, 2025
@josevalim
Copy link
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