[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Anyone have a 5.2 version of Peter Shook's patch?
- From: Gavin Wraith <gavin@...>
- Date: Fri, 17 Feb 2012 22:29:14 GMT
In message
<CAM=e0-qx_QjGw8D8o0Nm03qOyzZqJEvJ5h3U6ORbjRiAQcD10A@mail.gmail.com>
you wrote:
> ....... so falling back on RiscLua's
> minimal version of the patch seems safe...
I first incorporated Peter Shook's patch, in its full form, for RiscLua
in October 2005, just after Lua 5.1(alpha+) came out. I stuck to that
but it gradually dawned on me that the only circumstances when I used
it were in the local case.
In fact I made a habit of using local variables for everything
except names of libraries and built-in values (unless they were used
in loops, where I would use a local value). I found that the patch gave
pleasingly terse syntax when one was iterating over a list of
records, e.g.
for _,record in ipairs(list) do
local name,adr,email,job in record
display(name,adr,email,job)
end
So eventually I used only the minimal version of the patch. It looks like
I may have avoided some problems in keeping the patch uptodate by doing
that.
--
Gavin Wraith (gavin@wra1th.plus.com)
Home page: http://www.wra1th.plus.com/