Re: Property descriptors as ES6 Maps

2012-11-01 Thread Tom Van Cutsem
Hi, David, I think I see where you are going: property descriptors are basically bags of key/value properties, and maps are a more direct representation of this concept than objects. On the other hand, as so carefully explained by Allen, there currently isn't really an issue with the mapping

Re: Property descriptors as ES6 Maps

2012-11-01 Thread David Bruant
Le 01/11/2012 10:37, Tom Van Cutsem a écrit : On the other hand, as so carefully explained by Allen, there currently isn't really an issue with the mapping between property descriptors and objects: at all the boundary points, we make sure to properly convert descriptors into well-behaved

Re: Property descriptors as ES6 Maps

2012-11-01 Thread Brandon Benvie
Another argument against using maps is it can actually be pretty useful to use the features that prototypal inheritance and the object model provides. function Descriptor(configurable, enumerable){ this.configurable = configurable; this.enumerable = enumerable; } Descriptor.prototype = {

Synchronous Object.observe but Asynchronous Object.unobserve ?

2012-11-01 Thread Andrea Giammarchi
Just wondering if this is actually meant/expected, I am talking about the example here: http://wiki.ecmascript.org/doku.php?id=harmony:observe#example and the fact it should show something in console while in my opinion that should show nothing since the Object.unobserve is called in the same

Re: Synchronous Object.observe but Asynchronous Object.unobserve ?

2012-11-01 Thread Erik Arvidsson
On Thu, Nov 1, 2012 at 4:32 PM, Andrea Giammarchi andrea.giammar...@gmail.com wrote: Just wondering if this is actually meant/expected, I am talking about the example here: http://wiki.ecmascript.org/doku.php?id=harmony:observe#example I'm not sure I understand your point. The example is not

Re: Array.prototype.contains

2012-11-01 Thread Joshua Bell
Bump. I don't think Array.prototype.contains ever materialized on the proposals page, and hasn't shown up in an ES6 draft. Officially out for ES6, stuck in the queue, or dropped on the floor? On Fri, Feb 24, 2012 at 4:40 PM, Rick Waldron waldron.r...@gmail.comwrote: Allen, thank you for the

Re: Property Descriptors as script compatible representation (was: Property descriptors as ES6 Maps)

2012-11-01 Thread Allen Wirfs-Brock
On Nov 1, 2012, at 6:03 AM, David Bruant wrote: Le 31/10/2012 19:03, Allen Wirfs-Brock a écrit : Let me summarize what I think is your concern. In ES5, property descriptor records are a specification device that is used to transport information about object properties between factored

WeakMap and primitive keys

2012-11-01 Thread Nathan Wall
Looking at the recent draft, I noticed that the WeakMap methods accept primitive keys, converting them to objects, and acting like an object was passed in. This differs from the current behavior of Chrome and Firefox, which both throw if key is not an object. It seems, as the current draft

Re: Property descriptors as ES6 Maps

2012-11-01 Thread Axel Rauschmayer
(Assuming that I understand the issue.) The object to map refactoring matters whenever you don't know the keys in advance. If you do, as is the case with property descriptors, objects are fine. Then they are more like records than like maps. Axel [[[Sent from a mobile device. Please forgive

Re: WeakMap and primitive keys

2012-11-01 Thread Allen Wirfs-Brock
copy/paste bug!! Allen On Nov 1, 2012, at 9:05 AM, Nathan Wall wrote: Looking at the recent draft, I noticed that the WeakMap methods accept primitive keys, converting them to objects, and acting like an object was passed in. This differs from the current behavior of Chrome and Firefox,

Re: WeakMap and primitive keys

2012-11-01 Thread Brendan Eich
On file? Nathan, thanks for catching this! /be Allen Wirfs-Brock wrote: copy/paste bug!! Allen On Nov 1, 2012, at 9:05 AM, Nathan Wall wrote: Looking at the recent draft, I noticed that the WeakMap methods accept primitive keys, converting them to objects, and acting like an object was

Re: WeakMap and primitive keys

2012-11-01 Thread Allen Wirfs-Brock
On Nov 1, 2012, at 10:40 PM, Brendan Eich wrote: On file? already fixed in my draft. Nathan, thanks for catching this! /be Allen Wirfs-Brock wrote: copy/paste bug!! Allen On Nov 1, 2012, at 9:05 AM, Nathan Wall wrote: Looking at the recent draft, I noticed that the WeakMap