<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Received on the -comments list. <div class=""><br class=""></div><div class="">Summary: another plea for “just do what Swift does”. </div><div class=""><br class=""></div><div class="">My response: The approach of “just do what language X does” is intrinsically irresponsible; nearly every feature of every language is conditioned by other features of that language. Instead, the game is to learn from how other languages do things, assess the tradeoffs they’ve chosen (explicitly and implicitly), and ask what can be applied to the constraints of the language we have and user expectations within the community we have. That said, there's lots to learn from Swift did (note that this aligns strongly with John’s “strong interruptor” theory). </div><div class=""><br class=""></div><div class="">Similarly aligned with John’s point from the other day, is that raw/non-raw is not a binary, but a spectrum, and in that, there may be a path to seeing the two in a unified framework, rather than two alternatives. This is a useful direction to explore, and, if we go this way, we should drop the “raw” terminology by the wayside, because its both pulls the design center in another direction, and is a confusing way to describe the feature. (Kotlin has similarly adopted the “raw” terminology in a distinctly non-raw way, which is similarly unfortunate.). </div><div class=""><br class=""></div><div class="">All that said, purely for purposes of making forward progress, I'm declaring a temporary moratorium on raw-ness and escaping until we work out the 1/1a story for multi-line strings. We’re deep in Jim’s “hangry” territory, and we need to eat something before we dive down that rathole. </div><div class=""><br class=""></div><div class=""><div><br class=""><blockquote type="cite" class=""><div class="">Begin forwarded message:</div><br class="Apple-interchange-newline"><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;" class=""><span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif; color:rgba(0, 0, 0, 1.0);" class=""><b class="">From: </b></span><span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif;" class="">Fred Curts <<a href="mailto:fred.curts@icloud.com" class="">fred.curts@icloud.com</a>><br class=""></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;" class=""><span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif; color:rgba(0, 0, 0, 1.0);" class=""><b class="">Subject: </b></span><span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif;" class=""><b class="">String reboot (plain text)</b><br class=""></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;" class=""><span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif; color:rgba(0, 0, 0, 1.0);" class=""><b class="">Date: </b></span><span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif;" class="">March 18, 2019 at 7:43:56 AM EDT<br class=""></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;" class=""><span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif; color:rgba(0, 0, 0, 1.0);" class=""><b class="">To: </b></span><span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif;" class=""><a href="mailto:amber-spec-comments@openjdk.java.net" class="">amber-spec-comments@openjdk.java.net</a><br class=""></span></div><br class=""><div class=""><div class="">Let's do a thought experiment: If Java literally adopted Swift's string literals, there would be no old/new or raw/non-raw distinctions. There would just be single line and multiline strings with customizable string delimiters. (Swift's "raw string" terminology is unfortunate.) A truly raw string literal would be easy enough to simulate with a highly customized string delimiter (which, importantly, also gives a highly customized escape sequence) and unindented closing delimiter. String interpolation could be added later (even for single line strings) because it's based on the existing (now customizable) escape sequence. What's not to like here?<br class=""><br class="">In my view, Swift demonstrates that customizable string delimiters (which also affect escape sequences) make a raw/non-raw distinction unnecessary. (Note that this has nothing to do with coupling orthogonal features.) I have yet to hit a case where Swift's string literals prove inadequate in practice.<br class=""><br class="">-Fred<br class=""><br class="">On Wed, Mar 13, 2019 at 12:57 PM Brian Goetz <brian.goetz at <a href="http://oracle.com" class="">oracle.com</a>> wrote:<br class=""><br class=""><blockquote type="cite" class="">To the “indent is good enough” point: Auto reflow is a disaster when<br class="">applied to mixed spaces and tabs; while in general one should avoid this, I<br class="">cannot rule out the possibility that someone might actually want to embed<br class="">such a snippet; in that case, truly raw strings are an option. If we take<br class="">away truly raw, now they just have two bad approximations.<br class=""></blockquote><br class=""></div></div></blockquote></div><br class=""></div></body></html>