Text blocks / Multi-line string literals
John Rose
john.r.rose at oracle.com
Mon May 13 23:50:47 UTC 2019
On May 13, 2019, at 4:41 PM, Stephen Colebourne <scolebourne at joda.org> wrote:
>
> On Tue, 14 May 2019 at 00:08, John Rose <john.r.rose at oracle.com> wrote:
>>>> 3) The proposal is a little bit hostile to Markdown, because markdown
>>>> relies on significant whitespace at the end of the line. I'd really
>>>> like to see a new escape \s for \u0020 added at the same time as this
>>>> feature to ensure there is a way out of the problem.
>>>
>>> That seems like a great idea to me…
>>
>> Just to rub everyone's nose in it again, \0020 is currently
>> indistinguishable from a plain space. So \s (which I support)
>> would be a new escape for \040 and **NOT** for \u0020.
>
> Just to be clear, I'm proposing that \s is processed at the same time
> as \t, \r and \n in the text block scheme, ie at the end. And at that
> point it is fine to be a normal space.
Right, so you intended \u0020 to mean "just a space in the code",
as opposed from "a pretty ugly option for an escape sequence".
If everyone on this list read it that way than some force (not all)
is taken away from my insistence that we deal with \u order.
But someone on the list might have read your suggestion as
including a judgement that "\u0020 is not as nice an escape
sequence as \s", rather than quietly positing that "\u0020 is
not an escape sequence at all" (for string literals). And lots
of Java programmers will never quietly posit that at all; they
will simply be mystified at the interaction between \u0020
and blank stripping in text blocks. An \s escape, coupled
with a warning to stay away from \u0020, will steer them
away from the problem. And as I said, I would prefer to
take even more decisive steps to reframe the interaction
between \u escapes and strings.
— John
More information about the amber-dev
mailing list