lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


>>>>> "Dibyendu" == Dibyendu Majumdar <mobile@majumdar.org.uk> writes:

 Dibyendu> 1) Adding a 'toclose' variable in the 'for' loop is an
 Dibyendu> undesirable feature in my opinion. Not aware of any language
 Dibyendu> that does that.

You do realize that this is one of the primary reasons for 'toclose' to
exist at all? The fact that breaking or erroring out of a loop doesn't
give the iterator any chance to clean up is a significant problem (for
example, if iterating over io.lines, the file is not closed until it is
GC'd, which may not happen until much later).

-- 
Andrew.