# SIP-XX: Dedented Multiline String Literals

**URL:** <https://contributors.scala-lang.org/t/sip-xx-dedented-multiline-string-literals/7197>\
**Category:** Language Design\
**Created:** [August 15, 2025, 7:07pm UTC](https://contributors.scala-lang.org/t/sip-xx-dedented-multiline-string-literals/7197 "2025-08-15T19:07:26Z")\
**Posts on this page:** 1\
**Showing post:** 20

<div class="post-metadata">

**Author:** ![odersky](https://contributors.scala-lang.org/user_avatar/contributors.scala-lang.org/odersky/32/42_2.png) [@odersky](https://contributors.scala-lang.org/u/odersky)\
**Post date:** [August 17, 2025, 9:45am UTC](https://contributors.scala-lang.org/t/sip-xx-dedented-multiline-string-literals/7197/20 "2025-08-17T09:45:20Z")

</div>

@haoyi I now read the proposal in full and it does indeed discuss the alternatives I raised before.

But I am still a bit pained that we now use another lexical delimiter with `'''`. It does not feel very nice for a language that strives to be small and orthogonal in its features.

So maybe go back to using single `"` instead? The argument against is

> - This has the disadvantage that a single `"` isn’t very visually distinct when used for demarcating blocks of text, and separating them vertically from the code before and after

But I am not sure that’s a very strong point. Any editor or IDE would syntax-highlight strings, so you know their span by their color alone.

About embedded single-line string literals:

> [@devlaam](#):
>
> Yes, we can! There are a few options, define that the string is closed only by a
> 
> - single-quote as only character on a line. So all other single-quote are interpreted as quotes in the string

A slightly more lenient version would interpret a `"` as closing a multi-line string literal if

- there’s only whitespace between the last EOL and it, and
- there is no other `"` following anywhere on the same line.

That would allow any embedded single-line string without need for escapes.

A single `"` also has the advantage that one can easily refactor between single line and multi-line literals. The quotes would never need to change.

I feel the single`"` would tell a better story. Instead of having three string literals we only have one and a half. From now on it would always be single `"` for string literals, so we are effectively removing a syntactic feature. Triple quotes stay around only for backwards compatibility.

---

_[View the full topic](https://contributors.scala-lang.org/t/sip-xx-dedented-multiline-string-literals/7197)._
