> Still there, but write it out fully, to compare to the cited text:
> 
>   import keys from "@iter";
>   for (i of keys(o)) {
>     body
>   }
> 
> Unless we default-import a standard prelude,

I think we should.

> this is a bit much compared to add own as a modifier after for in for/in (not 
> for/of) loops.

For for-of semantics is one of the places we've bought into a "do-over" for a 
JS form. It muddies the waters to say "for-of is the new for-in" but also 
halfway reform for-in at the same time. I don't really think

    for (i of keys(o)) {
        /body/
    }

is such a burden (two characters, as you say).

Instead of taking a hard-to-use-right form like for-in and partly taming it, 
I'd rather suggest people simply move to for-of, and have the default keys 
iterator Do The Right Thing and only iterate over own, enumerable property 
names (thanks to Yehuda and Arv for straightening us out on this point 
recently).

Dave

_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to