Re: Array subclassing, .map and iterables (Re: Jan 30 TC39 Meeting Notes)

2013-02-17 Thread Allen Wirfs-Brock
On Feb 14, 2013, at 8:47 AM, Nathan Wall wrote: Hey Allen, thanks for clarifying. What will happen to other Array methods which currently return Arrays? `filter` is the primary one that comes to mind. Will `uint32array.filter((v) = v != 0)` return a Uint32Array? (I think it should behave

Re: Array subclassing, .map and iterables (Re: Jan 30 TC39 MeetingNotes)

2013-02-17 Thread Brendan Eich
Claus Reinke wrote: More immediately relevant for this thread, I would like to see Array Container with map, from, filter, and perhaps some others, moving from Array to Container. Then Map and Set would be Containers, supporting operations currently limited to Array This is not gonna

Re: Array subclassing, .map and iterables (Re: Jan 30 TC39 MeetingNotes)

2013-02-17 Thread Claus Reinke
More immediately relevant for this thread, I would like to see Array Container with map, from, filter, and perhaps some others, moving from Array to Container. Then Map and Set would be Containers, supporting operations currently limited to Array This is not gonna happen for several

Re: Array subclassing, .map and iterables (Re: Jan 30 TC39 MeetingNotes)

2013-02-17 Thread Brendan Eich
Claus Reinke wrote: I'd be interested to see your alternative design suggestion (or, in fact, any more general approach to the issue at hand that would fit into ES). From ES4, http://wiki.ecmascript.org/doku.php?id=proposals:static_generics. /be

Transitioning to strict mode

2013-02-17 Thread David Bruant
Hi, I'd like to share a piece of documentation I've recently written [1]. It's a guide to help developers understand how they can transition to strict mode and what they should be aware of while making this transition. Differences between strict and non-strict are divided into 3 categories:

Re: Case insensitive String startsWith, contains, endsWith, replaceAll method

2013-02-17 Thread Biju
On 16 February 2013 20:26, David Bruant bruan...@gmail.com wrote: Le 17/02/2013 00:58, Biju a écrit : Also, it doesn't seem that hard to implement: String.prototype.startsWithI = function(s){ this.match(new RegExp('^'+s, 'i')); } you also made the common error any developer

Re: [].push wrt properties along the [[Prototype]] chain

2013-02-17 Thread Norbert Lindenberg
Using Jeff's tests, I don't see exceptions being thrown in any of these browsers: IE 9 and the current versions of Safari on Mac/iOS, Firefox/Chrome/Opera on Mac/Windows. I don't have IE 10. I also checked the tests in directory 15.4.4.7 of Test262; they don't cover these cases. Adding

Re: Case insensitive String startsWith, contains, endsWith, replaceAll method

2013-02-17 Thread Norbert Lindenberg
Actually, it's not just case that users want to ignore. In many use cases, users search for something similar to their search string, and the definition of similar can vary substantially. For example, an English speaker typically wants San Jose to also match San José, especially when he doesn't