This is the discussion page for enumerability.
Instead of a meta DontEnum bit on each property, define a builtin namespace called enumerable:
namespace enumerable
The for-in and for-each-in operators will find all the enumerable properties and no others. Dynamic properties go in the enumerable namespace automatically. Enumerable namespace is open automatically for ordinary code as if the program included
use namespace enumerable
The spec grammar allows multiple attributes, there doesn’t seem to be any restriction on “public English var foo”. So “enumerable” could be an internal namespace, like “public”?
DontEnum looks like something we should not encourage, better to use iterators.
— Lars T Hansen 2006/03/17 13:10