Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:25
erlang
4001-Update-Upcoming-Potential-Incompatibilitie...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 4001-Update-Upcoming-Potential-Incompatibilities.patch of Package erlang
From 03dc97975ea0f5fac43fea5e8b5b169c6c28375b Mon Sep 17 00:00:00 2001 From: Raimo Niskanen <raimo@erlang.org> Date: Mon, 4 Sep 2023 16:33:55 +0200 Subject: [PATCH] Update Upcoming Potential Incompatibilities --- .../upcoming_incompatibilities.xml | 69 +++++++++++++++++++ 1 file changed, 69 insertions(+) diff --git a/system/doc/general_info/upcoming_incompatibilities.xml b/system/doc/general_info/upcoming_incompatibilities.xml index 8538067b57..1f34a31032 100644 --- a/system/doc/general_info/upcoming_incompatibilities.xml +++ b/system/doc/general_info/upcoming_incompatibilities.xml @@ -201,6 +201,79 @@ the regular expression before matching with it.</p></item> </list> </section> + + <section> + <marker id="triple_quoted_strings"/> + <title>Triple-Quoted Strings</title> + <p> + Before Erlang/OTP 27 a sequence of 3 or more double-quote characters + was grouped in pairs each meaning the empty string and if there was + an odd number the last character was the start of a string. + The empty strings were then concatenated and effectively disappeared. + </p> + <p> + In Erlang/OTP 27; 3 or more double-quote characters + are interpreted as the start of a "Triple-Quoted String". See + <url href="https://www.erlang.org/eeps/eep-0064">EEP 64</url>. + </p> + <p> + Here follows some examples of code that would change meaning. + Note that all these examples before Erlang/OTP 27.0 was strange + since there was no sensible reason to write like that. + </p> + <pre> +"""String Content""" +%% Was interpreted as +"" "String Content" "" +%% Which becomes +"String Content" +%% +%% In OTP 27 it is instead a syntax error since no text is allowed +%% on the line after an opening triple-quote + </pre> + <pre> +""" +String Content +""" +%% Was interpreted as +"" " +String Content +" "" +%% Which becomes +" +String Content +" +%% +%% In OTP 27 it is instead interpreted as a +%% Triple-Quoted String equivalent to +"String Content" + </pre> + <pre> +"""" +++ foo() ++ +"""" +%% Became +"" ++ foo() ++ "" +%% +%% In OTP 27 it is instead interpreted as a +%% Triple-Quoted String (triple-or-more) equivalent to +"++ foo() ++" + </pre> + <p> + From Erlang/OTP 26.1 up to 27.0 the compiler issues a warning for + a sequence of 3 or more double-quote characters + since that is almost certainly a mistake or + something like a result of bad automatic code generation. + If a users gets that warning, the code should be corrected + for example by inserting appropriate spaces between + the empty strings, or removing the redundant ones alltogether, + which will have the same meaning before and after Erlang/OTP 27. + </p> + </section> + + </section> + + <section> </section> </chapter> -- 2.35.3
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor