> On Apr 6, 2015, at 2:23 PM, Dmitry Soshnikov <dmitry.soshni...@gmail.com> 
> wrote:
> 
> I guess all built-in iterators return themselves for `Symbol.iterator` 
> protocol. So they are all "singletons". I described in detail where 
> confusion/substitution of concepts happens in that analysis in the recent two 
> comments.
> 

I don’t think “singleton” is the correct term for the concept that Axel is 
trying to describe.  A “singleton” is normally an kind of object for which 
there is only a single instances.  There may be many instances of, for example 
%ArrayIterator%, so it isn’t correct to call %ArrayIterator% a singleton

What Axel is describing might be characterized as “self iterable”, it returns 
itself when recieving a Symbol.iterator request.

Allen

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

Reply via email to