`String.prototype.symbolAt()` (improved `String.prototype.charAt()`)

Andrea Giammarchi andrea.giammarchi at gmail.com
Sat Oct 19 12:22:13 PDT 2013

a nested loop might be a concrete case where `O(n)` happens ... not so
common with strings but quite possibly used in many parsers implemented in
JS itself.

On Sat, Oct 19, 2013 at 12:11 PM, Brendan Eich <brendan at mozilla.com> wrote:

> Allen Wirfs-Brock wrote:
>> The use case that we don't support well is any sort of back wards
>> iteration of the characters of a string. We don't current have an iterator
>> specified to do it, nor do we have a one stop way to test whether we at
>> looking at the trailing surrogate of a surrogate pair.
> What do you mean by "one stop"? O(1)? We aren't going to mandate
> implementations make such tests (or backward iteration) that cheap.
> Is there yet a real world (from the field, not a testcase) use-case for
> backward iteration?
> /be
> ______________________________**_________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/**listinfo/es-discuss<https://mail.mozilla.org/listinfo/es-discuss>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20131019/353c3c9b/attachment.html>

More information about the es-discuss mailing list