[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] Lua 5.4.0 (alpha) now available
- From: Andrew Gierth <andrew@...>
- Date: Fri, 21 Jun 2019 21:34:38 +0100
>>>>> "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.