On Fri, Jan 10, 2014 at 10:26 AM, Anne van Kesteren <ann...@annevk.nl> wrote: > > On Fri, Jan 10, 2014 at 6:22 PM, Allen Wirfs-Brock > <al...@wirfs-brock.com> wrote: > > https://bugs.ecmascript.org/show_bug.cgi?id=1557 is a request that > > StringView [1] over ArrayBuffers be added to ES. > > > > [1] > > https://developer.mozilla.org/en-US/docs/Web/JavaScript/Typed_arrays/StringView > > Where is this from? > > Google and Mozilla have implemented the API from > http://encoding.spec.whatwg.org/ as a means to get strings out of > bytes (and bytes out of strings). It's not clear we need anything > else.
There was some discussion about implementing StringView on the blink-dev mailing list in August 2013. My opinion was and is that the Encoding spec satisfies these use cases. Adding a StringView to Typed Arrays would bring along all of the complexities of character set encoding and decoding to the Typed Array definitions. Typed Arrays were designed to be small, simple, and comprehensible enough that they would be easily implementable and optimizable. I believe that adding a StringView would contradict these goals. -Ken _______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss