There's a historically convenient feature in strings:
str: {This was {a historically legal} string.}
Each time you used an open brace inside a string, it would increment a "nesting count". And when you used a close brace it would drop the nesting count. When you got to zero, your string was finished.
It works in a lot of cases, but not if you have unpaired braces in your content:
c-code: { if char = '}' { printf("This won't work.\n"); } }
We're going to be getting some instant improvement here with the new string format, using dashes. Since at least one dash is required (otherwise you'd get a fence), cases like the above will "just work":
c-code: -{ if char = '}' { printf("This will work!\n"); } }-
But should we still support the nesting idea?
str: -{Should this -{still be a legal}- string?}-
The alternative would be to force you to use more dashes:
str: --{This -{is definitely a legal}- string.}--
As we can see from the above, that move from one dash to two dashes does lengthen things. The tightness is appealing to have as an option.
But It's Complicated...
Let's put aside equal counts for a moment. What happens if you nest higher counts (which contain lower counts, by definition)
str: -{What ---{do you think this}--- should do?}- ; [1]
If it were rotely searching for }-
then it would find it at this}-
and consider that the end.
str: -{To look at ---{another one, consider}- this...}- ; [2]
Do we want the rule that if you ever enclose code with the dashed brace style like --{
and }--
the enclosure will always need more dashes than what it encloses?
When I put it that way, I think that we don't want to force that escalation. You can always go there if you need to (case 2 above requires it, or using quotes on the outside instead). But I think being able to dodge it in cases where things are paired (as in case 1) is worth the dodge.
(Note that if you are trying to analyze the inside of the string for matched pairs that are other than the ones you asked for from the outside delimiter, then suddenly you're maintaining a stack of quote levels where nest level has an independent associated number of dashes, instead of just maintaining a total nesting count. Not that this is a difficult problem, but it's just "another thing".)