Triple quoted strings

Peter Hall peter.hall at memorphic.com
Wed Mar 5 16:14:38 PST 2008


Except that it would have a few unexpected behaviours, especially
around the & and < characters.

Peter


On Wed, Mar 5, 2008 at 11:53 PM, Igor Bukanov <igor at mir2.org> wrote:
> On 06/03/2008, jeff.ecmascript at tanasity.com
>
> <jeff.ecmascript at tanasity.com> 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.
>
>
> _______________________________________________
>  Es4-discuss mailing list
>  Es4-discuss at mozilla.org
>  https://mail.mozilla.org/listinfo/es4-discuss
>



More information about the Es4-discuss mailing list