A shorthand for Object.defineProperty?

Axel Rauschmayer axel at rauschma.de
Mon Jun 20 21:39:07 PDT 2011


> Plus on top, decorators are for metadata that may be erased, or that at least must be optional. Non-writability in ES5 and up is not optional or erasable.

IIRC then Python decorators are functions that are applied to the property value (not entirely unlike quasis). This *could* be adapted to pass in |this| plus property name plus value for properties and be used for all kinds of things.

-- 
Dr. Axel Rauschmayer

axel at rauschma.de
twitter.com/rauschma

home: rauschma.de
blog: 2ality.com





More information about the es-discuss mailing list