Skip to content

Commit

Permalink
Refer to existing Erlang types
Browse files Browse the repository at this point in the history
  • Loading branch information
RaimoNiskanen committed Sep 27, 2023
1 parent 2665d4a commit 56d1057
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions eeps/eep-0065.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ language features, many of which exists in Elixir under the umbrella of
* [String Interpolation Syntax][2]
* Regular Expression Syntax
* Choice of string delimiters
* Binary Strings
* Binary Strings; `unicode:unicode_binary()`
* Verbatim Strings
* Escape sequences in [Triple-Quoted Strings][EEP 64] (multi-line strings)

Expand Down Expand Up @@ -159,8 +159,10 @@ insensitive regular expression.

The suggested Sigil Types, inherited from Elixir, are:

* «`s`»: binary string, an string represented as an UTF-8 encoded binary
* «`c`»: char list, an Erlang string (Unicode codepoint list)
* «`s`»: `unicode:unicode_binary()`, a string represented
as a UTF-8 encoded binary
* «`c`»: `string()`, an Erlang string, a.k.a character list
(Unicode codepoint list)
* «`r`»: regular expression, pre-compiled.
[Sigil Suffix][]es such as in Elixir: «`u`», «`i`», «`s`», «`m`»,
«`x`», «`f`» and «`U`», should be implemented as flags to
Expand All @@ -169,16 +171,17 @@ The suggested Sigil Types, inherited from Elixir, are:

All those Sigil Types allow both escape sequences and string interpolation.

The capital letter Sigil Types «`S`», «`C`» and «`R`» are siblings
to the above but takes the String Content verbatim as in
does not handle escape sequences nor string interpolation.
The capital letter Sigil Types «`S`», «`C`» and «`R`» are
siblings to the above but takes the String Content verbatim as in
do not handle escape sequences nor string interpolation.

#### The Empty Sigil

The Empty Sigil (default type) should either be disallowed, like in Elixir,
or implement the most desired use case, which might be one of
The Empty Sigil (default [Sigil Type][]) should either be disallowed,
like in Elixir, or implement the most desired use case,
which might be one of:

* Shorthand for today's binary strings:
* Shorthand for today's `unicode:unicode_binary()`s:
«`~"Content"`» equivalent to «`<<"Content"/utf8>>`»
* Regular strings with choice of [String Delimiters][]:
«`~{"Content"}`» equivalent to «`"\"Content\""`»
Expand Down

0 comments on commit 56d1057

Please sign in to comment.