Below...Brendan Eich <bren...@mozilla.org> wrote:> Allen Wirfs-Brock 
<mailto:al...@wirfs-brock.com>
> January 23, 2012 8:43 AM
> On Jan 22, 2012, at 7:36 PM, Tab Atkins Jr. wrote:
>
?..
>
> const getIterator = Iterator.getIterator;
> myCoolObject.prototype.@getIterator = function() {...}

Why wouldn't myCoolObject.prototype[iterator.getIterator] work?

/be

It would, for now.  But, I think you gave the reason for avoiding this pattern 
in another reply. If we ever want to adopt my Reformed Object Model proposal 
then we should avoid using [ ] for private name property access.  lt would 
actually still work fine for objects with default [ ] behavior but not for 
collection objects that redefine [ ] access.

Before encouraging a new pattern like obj[Iterator.GetIterator] we should think 
about its future-proofing implicationa.

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

Reply via email to