IIRC the problems with C character literals began when they began to
generalize the original concept of representing a single ASCII character.
Repurposing 'x' to something like multiline strings might be confusing
to people migrating from other languages, but perhaps refocusing on the
original usage would not be?
IOW, 'x' where x must be a Character, that is, an extended Unicode
grapheme cluster — represented in the source code as UTF8 or with the \u
notation. A shortcut for typing Character("x").
On 12/14/15 20:40, email@example.com wrote:
> On Dec 11, 2015, at 4:03 PM, Travis Tilley <firstname.lastname@example.org> wrote:
> Fair enough. Plus if Chris Lattner has any strong opinions about the behavior of single quotes, which might be the case given the existing code for handling them in Lexer.cpp, backticks are a damn good alternative. I'd still like to wait to hear back from him or someone else on the core team about that one.
Support for single quoted literals like 'x' was a legacy feature for C-like character literals that we explored before the design of Character went to where it is now. I’d be fine ripping it out and repurposing it.