Would it make sense to include a shorthand for calling Object.defineProperty()
to object literals?
Possible benefits:
- Extensible, should other property attributes come up in the future
- Descriptive
- Might obviate the need to have a shorthand for "enumerable" (I usually ignore
it and can’t think of any use cases)
=== Example ===
var Multiplier = {
FACTOR :: { value: 3, writable: false },
multiply: function (x) {
return x * this.FACTOR;
}
}
--
Dr. Axel Rauschmayer
[email protected]
twitter.com/rauschma
home: rauschma.de
blog: 2ality.com
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss