Full Unicode strings strawman

Douglas Crockford douglas at crockford.com
Thu May 19 11:18:56 PDT 2011

On 11:59 AM, Brendan Eich wrote:
> But hey, if JS does not need to change then we can avoid trouble and 
> keep on using 16-bit indexing and length. Is this really the best outcome?
It may well be. The problem is largely theoretical, and the many offered 
cures seem to be much worse than the disease. The language works as it 
has worked for years. It is not ideal in all of its aspects, especially 
when examined from a critical, abstract perspective. But practically, JS 
strings work.

I have come around in thinking that we should have \u{HHHHHH} in string 
and regexp literals (excluding character classes) as a more convenient 
way of specifying extended characters.

A more critical need is some form of string.format or quasiliterals. The 
string operation that is most lacking is the ability to inject correctly 
encoded material into templates. Having such a mechanism, it will little 
matter if the inserted characters are basic or extended.

More information about the es-discuss mailing list