A typical usage of a Scala multiline string literal looks like:
val s = """one |two |three""".stripMargin.
I’ve always disliked the need to manually specify the margin using
| and then strip them away using
stripMargin, and now Java is introducing multiline string literals using basically the same syntax, but with automatic margin stripping: https://openjdk.java.net/jeps/378. So how about we adopt the same algorithm for Scala string literals? It’s a breaking change but I think it’s less likely to break things than to fix existing code where usage of stripMargin was forgotten (I’ve seen this happen multiple times just in the dotty codebase, so I expect this to be a common error).