Re: New Set.prototype methods

2016-05-31 Thread Tab Atkins Jr.
On Sun, May 29, 2016 at 6:13 AM, Michał Wadas wrote: > I have written proposal for new Set.prototype methods. > > https://github.com/Ginden/set-methods > > New methods would be: > > Set.prototype.filter > Set.prototype.map > Set.prototype.some > Set.prototype.every >

Re: A plan to help TC39 become more open up to community contributions and participations

2016-05-31 Thread Allen Wirfs-Brock
I think this is a very interesting idea. TC39 has put a lot of effort into community transparency over the last decade but Ecma International (really most international standards organization) is organizationally not structured or naturally inclined to directly accept “contributions” from

Re: Subclassing native class and instanceof operator

2016-05-31 Thread Allen Wirfs-Brock
> On May 31, 2016, at 3:25 AM, Logan Smyth wrote: > > The correct spec behavior is to return an instance of `MyError`. Step 7 in > your example is not equivalent to calling `Error` without `new`, which seems > to be your assumption. The `newTarget` parameter passed to

Re: Subclassing native class and instanceof operator

2016-05-31 Thread Logan Smyth
The correct spec behavior is to return an instance of `MyError`. Step 7 in your example is not equivalent to calling `Error` without `new`, which seems to be your assumption. The `newTarget` parameter passed to `Construct` is used to determine the prototype of the final object, and in this context

Re: Subclassing native class and instanceof operator

2016-05-31 Thread Gray Zhang
I know NodeJS outputs `true` in this case, but my problem is from the spec it seems `false` is the correct result, or am I missing some chapters in spec? Jordan Harband 于2016年5月31日周二 下午2:47写道: > In which engine did you try this? Please refer to >

Re: Subclassing native class and instanceof operator

2016-05-31 Thread Jordan Harband
In which engine did you try this? Please refer to http://kangax.github.io/compat-table/es6/ under "Subclassing" to see if your browser supports subclassing builtins yet. On Mon, May 30, 2016 at 11:32 PM, Gray Zhang wrote: > Recently I encountered an issue about subclassing

Subclassing native class and instanceof operator

2016-05-31 Thread Gray Zhang
Recently I encountered an issue about subclassing Error and instance operator, my simplified code is: ``` class MyError extends Error { constructor() { super('my error'); } } let error = new MyError(); console.log(error instanceof MyError); console.log(error.constructor); ```