for own(...) loop (spin-off from Re: for..in, hasOwnProperty(), and inheritance)
Jeremy Ashkenas
jashkenas at gmail.com
Tue Nov 8 13:19:58 PST 2011
On Tue, Nov 8, 2011 at 3:49 PM, Brendan Eich <brendan at mozilla.com> 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20111108/aebda459/attachment.html>
More information about the es-discuss
mailing list