Triple quoted strings

Igor Bukanov igor at
Wed Mar 5 15:53:22 PST 2008

On 06/03/2008, jeff.ecmascript at
<jeff.ecmascript at> wrote:
> If I understand the motivation for triple quoted strings, it's to allow
>  multiline strings with inverted commas and quotes within them, and to
>  allow quotes and inverted commas within those substrings, all without
>  requiring a continuation marker.
>  PHP has a structure that's used for this sort of thing, which works
>  quite well and is used when you have a large block of text tobe used as
>  a string. As an example of when this is used, commonly, emails that are
>  constructed in code use this technique.

The interesting thing is ECMAScript E4X extension already allows to
enter multiline strings like in:

var i = 10;
var str = <x>arbitrary
multiline text that can embed expression
{i * 2} references</x>.toString();

The triple quota proposal would introduce significantly less powerful
mechanism for embedding the strings.

More information about the Es4-discuss mailing list