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.

+∞

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).

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

Reply via email to