quasi-literal strawman

Brendan Eich brendan at mozilla.com
Tue Dec 15 10:07:47 PST 2009

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


(from ES4, but still relevant and reusable AFAICT).


More information about the es-discuss mailing list