ES4 draft: enumerability

Jason Orendorff jason.orendorff at gmail.com
Thu Apr 24 08:52:41 PDT 2008


The iterator proposal:
http://wiki.ecmascript.org/doku.php?id=proposals:iterators_and_generators
is out of date or seems contradictory in several places:

* Do implementations have to provide the primitives in the "magic"
  namespace?

  In one place, the proposal says, "The magic::getEnumerableIds
  primitive is a specification device only.", but then it says things
  like, "the new magic::getEnumerableIds primitive" and "As specified
  above under Enumeration, magic::getPropertyIds returns an array..."
  which make it sound like a standard feature, visible to ES4 programs.

* I think this sentence is obsolete: "To customize for ([k, v] in o)
  loops and comprehensions, set iterator::getItems."

* Under "Comprehensions", the new "let" syntax isn't there yet.

* The implementation of DEFAULT_GET visits properties outside the public
  namespace; I think that's out of date.  (It seems unuseful anyway, as
  in that case DEFAULT_GET discards the namespace and produces the
  identifier.)

* The proposal claims Object implements ItemizableType, but I think that
  was scrapped as well.

* The proposal says for-in loops specially close() "newborn"
  generator-iterators.  I think this has changed.

I have more substantive comments on this proposal (to follow).

-j



More information about the Es4-discuss mailing list