Set constructor arguments

Tab Atkins Jr. jackalmage at
Wed Feb 15 11:55:11 PST 2012

On Wed, Feb 15, 2012 at 9:15 AM, Allen Wirfs-Brock
<allen at> wrote:
> Or just an infinite loop.
> Every time somebody invokes an abstracted operation there is the possibility
> that it will never complete.
> We don't worry about the possibility that a stack overflow or infinite loop
> could occur in the code that provides the iterator so I don't see why we
> should worry about that in the code the exhausts the iterator.

Yup.  There's no real difference between:

let x = new Set(..someInfiniteIterator);


let x = new Set((function(){while(1){}})());

So let's not worry about it.


More information about the es-discuss mailing list