Standard Prelude (was: for own(...) loop (spin-off from Re: for..in, hasOwnProperty(), and inheritance))
# David Herman (14 years ago)
Let's answer this once we have the module-ized version of the standard library. Which I've been promising for far too long (mea culpa). Will get started on this tonight.
On Nov 8, 2011, at 8:39 PM, David Herman wrote:
I'm with you -- for-of is the new for-in, let is the new var.
So, what is imported as part of the standard prelude when one opts into ES.next?
module Name from "@name"; import {iterator, keys, values, items} from "@iter";
?
On Nov 8, 2011, at 8:39 PM, David Herman wrote: > 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). I'm with you -- for-of is the new for-in, let is the new var. So, what is imported as part of the standard prelude when one opts into ES.next? module Name from "@name"; import {iterator, keys, values, items} from "@iter"; ? /be -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20111108/323e0791/attachment.html>