On `String.prototype.codePointAt` and `String.fromCodePoint`

Anne van Kesteren annevk at annevk.nl
Tue Sep 24 14:45:02 PDT 2013

On Tue, Sep 24, 2013 at 12:15 PM, Mathias Bynens <mathias at qiwi.be> wrote:
> Is it a good idea for engines to start implementing these methods, or is their design still being discussed? The definitions of these methods have been in the ES6 draft for a long time (since July 2012) without any changes. Does that indicate stability? How sure are we that they will end up in the final ES6 spec?

I think I'm convinced that String.fromCodePoint()'s design is correct,
especially since the rendering subsystem deals with code points too.
String.prototype.codePointAt() however still feels wrong since you
always need to iterate from the start to get the correct code *unit*
offset anyway so why would you use it rather than the code *point*
iterator that is planned for inclusion?


More information about the es-discuss mailing list