[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: (not) handling new programming idioms with grace
- From: Patrick Donnelly <batrick@...>
- Date: Wed, 25 Jul 2018 08:37:20 -0700
On Tue, Jul 24, 2018 at 5:43 PM, John Belmonte <john@neggie.net> wrote:
> Sorry didn't realize that was psuedocode. Yes, same thing I proposed in
> another thread. But exit func must be a new 4th parameter else you'll break
> a lot of existing code.
I don't really see why? IIRC, the proposal was that the __exit
metamethod is called only if it exists. So if you want your "state"
object to be released if the loop breaks, add an __exit metamethod to
new code. Fortunately, it doesn't break anything in old versions of
Lua; it maintains the status quo.
--
Patrick Donnelly
- References:
- (not) handling new programming idioms with grace, John Belmonte
- Re: (not) handling new programming idioms with grace, Dibyendu Majumdar
- Re: (not) handling new programming idioms with grace, Roberto Ierusalimschy
- Re: (not) handling new programming idioms with grace, John Belmonte
- Re: (not) handling new programming idioms with grace, Viacheslav Usov
- Re: (not) handling new programming idioms with grace, John Belmonte
- Re: (not) handling new programming idioms with grace, Roberto Ierusalimschy
- Re: (not) handling new programming idioms with grace, John Belmonte
- Re: (not) handling new programming idioms with grace, Roberto Ierusalimschy
- Re: (not) handling new programming idioms with grace, Patrick Donnelly
- Re: (not) handling new programming idioms with grace, John Belmonte
- Re: (not) handling new programming idioms with grace, John Belmonte