On Oct 8, 2012, at 11:34 AM, Tom Van Cutsem wrote:

> 
> 
> 2012/10/8 Allen Wirfs-Brock <[email protected]>
> 
> Then we should also have the enumerate trap.
> 
> Absolutely. I wasn't arguing to get rid of it.
>  
>> 
>> I'm all for internal spec refactorings to avoid duplication, but I feel this 
>> particular refactoring is better left invisible to users.
> 
> I definitely want the internal methods and traps to be completely parallel.  
> If we take the path suggested above I will add the equivalent of [[keys]] and 
>  [[getOwnPropertyNames]] as essential internal methods and get rid of the 
> parameters to [[Enumerate]].
> 
> I wouldn't mind if the [[Keys]], [[GetOwnPropertyNames]] and [[Enumerate]] 
> internal methods dispatched to an internal GetPropertyKeys helper function 
> with flags. In fact, why don't we let [[Keys]] and [[GetOwnPropertyNames]] 
> dispatch to a helper parameterized by just an "enumerableOnly" flag. The 
> [[Enumerate]] trap is the only one that does a proto-chain-walk, it probably 
> deserves its own internal method despite a little redundancy in querying the 
> own property names.

Internal abstraction operations (helper functions) are just editorial devices 
that reduce the need to duplicate (and perhaps introducing errors) 
specification steps.   If it makes sense I'll use one in specifying these 
traps, but it doesn't make a normative difference to the specification. 

Allen


_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to