Re: Wiki updates for String, Number and Math libraries

2011-11-17 Thread Norbert Lindenberg
Hi Luke, For String.prototype.toArray, I didn't propose different behavior. The part of my message that you omitted continues "The function should be named to clearly indicate that it returns an array of UTF-16 code units. This also allows us to offer a parallel function that returns an array o

Re: Wiki updates for String, Number and Math libraries

2011-11-17 Thread Norbert Lindenberg
Fortunately we dropped reverse in the TC 39 meeting yesterday - nobody had an idea who would use it. I brought up combining character sequences as a concern for the other proposed functions (startsWith etc.). There the majority opinion was that the model of the existing String functions, ignori

Re: Wiki updates for String, Number and Math libraries

2011-11-17 Thread Gillam, Richard
> 1) String.prototype.reverse(), as proposed, corrupts supplementary > characters. Clause 6 of Ecma-262 redefines the word "character" as "a 16-bit > unsigned value used to represent a single 16-bit unit of text", that is, a > UTF-16 code unit. In contrast, the phrase "Unicode character" is used

RE: Wiki updates for String, Number and Math libraries

2011-11-17 Thread Luke Hoban
>> 1) String.prototype.reverse(), as proposed, corrupts supplementary >> characters. It was agreed at the meeting yesterday that this concern is significant enough, and reverse does not have sufficiently compelling use cases, so should not be included. >> 2) String.prototype.toArray(), as pr

Re: Wiki updates for String, Number and Math libraries

2011-11-16 Thread gaz Heyes
On 16 November 2011 01:37, Luke Hoban wrote: > * String Extras > http://wiki.ecmascript.org/doku.php?id=harmony:string_extras > Those pretty much don't add anything useful to String IMO :( I think a String function everyone has been crying out for is HTML entity encode/decode. __

Re: Wiki updates for String, Number and Math libraries

2011-11-15 Thread Norbert Lindenberg
Hi Luke, A few comments on the proposed String functions: 1) String.prototype.reverse(), as proposed, corrupts supplementary characters. Clause 6 of Ecma-262 redefines the word "character" as "a 16-bit unsigned value used to represent a single 16-bit unit of text", that is, a UTF-16 code unit.

Wiki updates for String, Number and Math libraries

2011-11-15 Thread Luke Hoban
The Harmony proposals page contains several additions to the core String, Number and Math libraries, adding some of the most commonly created and requested helper operations to these libraries for ES6. I've uploaded to the wiki a first draft of candidate spec text for these library additions: *