Property descriptors as ES6 Maps

Tom Van Cutsem at
Fri Nov 2 01:31:38 PDT 2012

2012/11/1 David Bruant <bruant.d at>

> The constructor I have proposed could have an equivalent initialization
> syntax.
> Object.defineProperty({}, 'a', PropDesc({value:42, writable:true}))

I see the merit in your proposal as making the Object->PropDesc conversion
explicit. However, I think it's too late for ES6: Object.defineProperty
must continue to accept Objects as its third argument, and that's even
shorter to write. So even if we would add such a PropDesc constructor, I
don't think most developers (including myself) would adapt.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list