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

Brendan Eich brendan at
Tue Nov 8 14:37:32 PST 2011

On Nov 8, 2011, at 1:19 PM, Jeremy Ashkenas wrote:

> On Tue, Nov 8, 2011 at 3:49 PM, Brendan Eich <brendan at> wrote:
>   for own (i in o) {
>     body
>   }
> This is a small thing but it might pay off in the long run.
> This is a very useful feature ... but for better or for worse, also shows off how much paren-free would help things. "for own key in object {" reads well, whereas "for own (key in object) {" reads strangely, because the adjective "own" naturally belongs next to it's nown "key", without an interloping lparen.

You'll be glad to know I'm still working on paren-free. You will be unsurprised to hear it needs even more newline significance to overcome some issues Waldemar Horwat pointed out.

I give paren-free very long odds for Better to design and prototype it, get it in as an opt-in for Narcissus, SpiderMonkey and other implementations to enable user-testing.

Good news for remains: array comprehensions and generator expressions use *only* paren-free for/of syntax.

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

More information about the es-discuss mailing list