Methods: automatic binding on read?

Axel Rauschmayer axel at
Thu Apr 12 09:58:24 PDT 2012

I wonder if, with the concise method notation for literals (and possibly class declarations), one couldn’t introduce three modes of accessing a property: Read (getter), write (setter) and call (call interceptor?).

- Manually assigned functions: everything works as it does now.
- Concise method notation:
   - Read: bind `this`
   - Write: apply defineMethod to the argument (not sure about this one)
   - Call: same as before

I have no idea how this would fit into the current semantics, so it might be a silly idea, but it would eliminate a common source of bugs.

Dr. Axel Rauschmayer
axel at


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

More information about the es-discuss mailing list