[raw-string] indentation stripping
brian.goetz at oracle.com
Fri Jun 15 15:05:00 UTC 2018
> * Brian Goetz:
>> - Most multi-line strings will be code snippets of some sort (JSON,
>> XML, SQL, Java, etc);
>> There’s some reason to believe that calling .stripIndent() will be so
>> common that it should be the default, rather than requiring users to
>> invoke it every time.
> These two statements are somewhat at odds because JSON, XML (at least
> with a DTD/schema), SQL and Java do not have significant whitespace
> outside their own string literals, so there is no strong reason to
> strip whitespace before parsing the string.
That's right; this is why there's a discussion to have. On both sides,
there are subjective arguments about what "most" users will want, and
hence what is the right default.
More information about the amber-spec-observers