Text blok follow up
Brian Goetz
brian.goetz at oracle.com
Wed Oct 30 13:18:09 UTC 2019
Indeed, regex is the biggest offender, with windows paths a distant second.
To be fair, the escape mangling is only a small part of the challenge of reading regular expressions :)
Perhaps your students would like a library like:
https://github.com/VerbalExpressions/JavaVerbalExpressions <https://github.com/VerbalExpressions/JavaVerbalExpressions>
at least while they are learning the concepts?
> 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 urgent
>> 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 think
>> 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 any
>> 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) and
>> one which is still alive (JDK-8233117).
>>>
>>> I'm coming back from JokerConf in Russia and everybody there were in
>> 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 real
>> issue we have left, raw strings, because while i agree that de-coupling
>> the two features text block and raw string was necessary, it also means
>> 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é.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/amber-spec-experts/attachments/20191030/98d3f432/attachment-0001.html>
More information about the amber-spec-experts
mailing list