Yeah; I am aware that ES2015 added measures that make it possible iterate over 
codepoints, but that was not quite my point. The problem that I see is that in 
some scenarios it makes sense to think of a string as an array of bytes, and 
sometimes you need to iterate over a string in terms of its codepoints. Some 
might even want to iterate in terms of visible glyphs, taking combining marks 
into account.

This ambiguity makes `String.prototype.map` moot, as it remains questionable 
what exactly should be iterated. Bytes? Codepoints? Entire glyphs?

On Thursday, May 17, 2018 5:41:32 PM CEST you wrote:
> Yeah; I am aware that ES2015 added measures that make it possible iterate
> over codepoints, but that was not quite my point. The problem that I see is
> that in some scenarios it makes sense to think of a string as an array of
> bytes, and sometimes you need to iterate over a string in terms of its
> codepoints. Some might even want to iterate in terms of visible glyphs,
> taking combining marks into account.
> 
> This ambiguity makes `String.prototype.map` moot, as it remains questionable
> what exactly should be iterated. Bytes? Codepoints? Entire glyphs?

Attachment: signature.asc
Description: This is a digitally signed message part.

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

Reply via email to