[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: upcoming changes in Lua 5.2 [was Re: Location of a package]
- From: Diego Nehab <diego@...>
- Date: Mon, 25 Feb 2008 14:16:29 -0500 (EST)
Hi,
FYI, I've just been converting some tracking loop code to do the following:
repeat
local event = getNextMouseEvent()
local done = event.what == "mouseUp"
-- do the tracking work
until done
So, obviously I would then be burned by a change that switched the scope of
the conditional. (Okay. Our linter would detect the access to the global
variable "done" and complain.)
I believe this type of code is what motivated the change,
and it seemed very reasonable at the time, mostly because
the language does not and did not support "continue". Had
the language supported "continue" from the start, the
problem with the change would have been obvious. I was a big
advocate for the change, and it never crossed my mind it
would ever be an issue. Even now, I still prefer the new
scope rule. There is a thread about this from 2005, when
somebody created a "continue" patch.
Regards,
Diego