for own(...) loop (spin-off from Re:, hasOwnProperty(), and inheritance)

Axel Rauschmayer axel at
Tue Nov 8 13:19:00 PST 2011

I see two domains for the concept of “own” properties:
1. Meta-programming.
2. Using objects as dictionaries.

Isn’t #2 the majority (at least as far as non-library-programmers are concerned)? Will the concept become less relevant once we have David Herman’s dicts?

I also like the Python-style iterator-based approach, e.g. something like the following:

     for ([key,value] on pairs(obj)) {

On Nov 8, 2011, at 21:49 , Brendan Eich wrote:

> Should provide sugar for the recommended pattern? To make it compose with declarations and destructuring in the for head, it should use a contextual keyword immediately after 'for':
>   for own (i in o) {
>     body
>   }
> This is a small thing but it might pay off in the long run.

Dr. Axel Rauschmayer
axel at


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

More information about the es-discuss mailing list