This feature changes the string lexicon from single-quotes to double-quotes. It is breaking, and it supersedes #5, #6, and #33.
let string_literal: str = "String literals are now double-quoted!
They now use **U+0022 QUOTATION MARK** as delimiters.
The rest of the syntax hasn’t changed —
They may still contain line breaks,
\"escape sequences\",
line continuations,\
and in-string comments. % this comment is omitted from the string value";
let string_template: str = """String templates are also double-quoted!
They are still delimited with three quotes.
The rest of their syntax hasn’t changed, either —
They may still contain line breaks and {{ interpolation }},
but no \"escape sequences\", line continuations\,
or in-string comments.
% The string value contains this comment and the backslashes written above.""";
Additionally, Unicode identifiers are now written with single-quotes instead of back-ticks.
let 'Svaret på den ultimata frågan.': int = 42;
Again, only the delimiter has changed; everything else stays the same.
no escapes: the identifiers '1\u{24}2' and '1$2' are not the same
uniqueness: the identifiers 'foo' and foo are not the same
whitespace and non-printing characters are allowed but strongly discouraged
they cannot contain an U+0027 APOSTROPHE at all: 'they\'re' is not a valid identifier
This feature changes the string lexicon from single-quotes to double-quotes. It is breaking, and it supersedes #5, #6, and #33.
Additionally, Unicode identifiers are now written with single-quotes instead of back-ticks.
Again, only the delimiter has changed; everything else stays the same.
'1\u{24}2'
and'1$2'
are not the same'foo'
andfoo
are not the same'they\'re'
is not a valid identifier