quasi-literal strawman

Mike Samuel mikesamuel at gmail.com
Tue Dec 15 10:43:15 PST 2009


2009/12/15 Brendan Eich <brendan at mozilla.com>:
> On Dec 14, 2009, at 3:34 PM, Ash Berlin wrote:
>
>> On 14 Dec 2009, at 22:44, Mike Samuel wrote:
>>
>>>> It would be convenient for some DSL use cases to allow LineTerminators
>>>> inside code, but it is unclear how this will interact with revision control
>>>> systems that rewrite newlines on checkout
>>
>> If you want to use a certain form of a new line for what ever reason, it
>> would probably be best to use \n. Line continuations are rather annoying to
>> use in practice - if you want the literal to be split over multiple lines,
>> and to have new lines in the source you end up ending every line with \n\
>> which is just ugly. Since we are already talking about new syntax, I would
>> vote for allowing multi-line literals.
>
> +∞

Ok, current count is (for: ∞ + 1, against 0, not voted: ~6B).

> The solution is to canonicalize platform-dependent CRLF or CR into LF only.
> See
>
> http://wiki.ecmascript.org/doku.php?id=proposals:line_terminator_normalization
>
> (from ES4, but still relevant and reusable AFAICT).

This proposal is compatible with that:
    * The LPA of LiteralCharacter :: LineTerminatorSequence is
      the single character string containing a LF ("\n").


> /be
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>


More information about the es-discuss mailing list