Text blok follow up

Remi Forax forax at univ-mlv.fr
Wed Oct 30 15:04:12 UTC 2019

On October 30, 2019 1:18:09 PM UTC, Brian Goetz <brian.goetz at oracle.com> wrote:
>Indeed, regex is the biggest offender, with windows paths a distant
>To be fair, the escape mangling is only a small part of the challenge
>of reading regular expressions :)

True in general.
In my case, and I believe this is true for a lot of universities, students starts with Python as first language, and in Python you have the r'foo' syntax. Then in Java, most of them don't struggle with the concept of regex or automata already seen but how to properly escape the regex string (with capturing groups) because the inability to express a raw string in Java.

>> On Oct 30, 2019, at 9:13 AM, Remi Forax <forax at univ-mlv.fr> wrote:
>> On October 30, 2019 12:30:06 PM UTC, Brian Goetz
><brian.goetz at oracle.com <mailto:brian.goetz at oracle.com>> wrote:
>>> First of all, the two are of different orders of magnitude; adding a
>>> few more escape sequences is not remotely the same thing as raw
>>> strings.  So it’s not either/or.  
>>> But, more importantly, I just don’t think raw strings are that
>>> any more.  Text blocks addressed 95% of the pain; sure, we could go
>>> back for that last 5%, and maybe we should some day, but I don’t
>>> its anywhere near the top of the priority list any more.  I’d rather
>>> invest the effort in getting to pattern matching, or valhalla, or
>>> number of other things sooner.  
>> Ah, interesting !
>> For me, the fact that you have to despecialize every slash inside a
>regex string is a use case big enough to justify raw strings.
>> I will happily admit that I'm biased by the fact that I see my
>students struggling to write the correct string to feed Pattern.compile
>or String.split every year.
>> But maybe a specific syntax for regex that create a Pattern using a
>condy is a better idea ?
>> Remi
>>>> On Oct 30, 2019, at 7:54 AM, Remi Forax <forax at univ-mlv.fr> wrote:
>>>> Hi all,
>>>> Jim, Brian,
>>>> please do not use the same name "Escape Sequences For Line
>>> Continuation and White Space (Preview)",
>>>> for two different features, one which is withdrawn (JDK-8227870)
>>> one which is still alive (JDK-8233117).
>>>> I'm coming back from JokerConf in Russia and everybody there were
>>> full confusion mode about that.
>>>> Moreover, my personal feeling is that we should stop to add such
>>> incremental niche feature, at least for now, and move to solve the
>>> issue we have left, raw strings, because while i agree that
>>> the two features text block and raw string was necessary, it also
>>> that we still have no support for raw strings.
>>>> Rémi
>> -- 
>> Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez
>excuser ma brièveté.

Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.

More information about the amber-spec-experts mailing list