Unicode support in new ES6 spec draft

Norbert Lindenberg ecmascript at norbertlindenberg.com
Tue Jul 17 15:03:17 PDT 2012


We agreed in November not to add String.prototype.reverse because there was no compelling use case for it. Is there now?
https://mail.mozilla.org/pipermail/es-discuss/2011-November/018581.html

Norbert


On Jul 17, 2012, at 14:49 , Brendan Eich wrote:

> Allen Wirfs-Brock wrote:
>> On Jul 16, 2012, at 2:57 PM, Mark Davis ☕ wrote:
>> 
>>> In order to support backwards iteration (which is sometimes used), we should have codePointBefore.
>> 
>> or we can provide a backwards iterator that knows how to parse surrogate pairs:
>>    for (let c of str.backwards) ...
>> 
>> Allen
> 
> Kind of a spin-off, but I think a String.prototype.reverse that avoids
> 
>  s.split('').reverse().join('')
> 
> overhead and ES6 Unicode hazard splitting on code unit boundary would be swell. It's tiny and matches Array.prototype.reverse but of course without observable in-place mutation.
> 
> It wouldn't relieve all use-cases for reverse iteration, but we have iterators and for-of in ES6, we should use 'em.
> 
> /be
>> 
>> 
>>> 
>>> ------------------------------------------------------------------------
>>> Mark <https://plus.google.com/114199149796022210033>
>>> /
>>> /
>>> /— Il meglio è l’inimico del bene —/
>>> //
>>> 
>> 
>> _______________________________________________
>> es-discuss mailing list
>> es-discuss at mozilla.org
>> https://mail.mozilla.org/listinfo/es-discuss
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss



More information about the es-discuss mailing list