Immediate closing of iterators

Peter Hall peterjoel at gmail.com
Thu Jan 4 03:01:08 PST 2007


But that means a programmer wouldn't have the option to close it
manually in that circumstance..

Peter


On 1/4/07, Igor Bukanov <igor.bukanov at gmail.com> wrote:
> On 1/3/07, Brendan Eich <brendan at mozilla.org> wrote:
> > On Jan 2, 2007, at 3:23 PM, Chris Hansen wrote:
> > for JS1.7
> > (in Firefox 2), we followed Python 2.5 closely for the sake of
> > guaranteeing finally execution when the last yield is from the
> > matching try.
>
> A simple way to address it is to require at the runtime that when
> yield is executed inside try with finally, the iterator object must be
> a part of for-in loop or, potentially, C#-like  autoclose(obj) {}
> block. If this is not the case, an exception should be thrown.
> _______________________________________________
> Es4-discuss mailing list
> Es4-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es4-discuss
>



More information about the Es4-discuss mailing list