On Fri, Nov 18, 2011 at 10:43 PM, William C. Bubel
<wcbubel@gmail.com> wrote:
On 11/18/2011 11:41 AM, GrayFace wrote:
> What I don't like about 5.2 is that 5.1 is cleaner in many ways.
> ...
> function definitions always produce a new function
Can somebody clarify this for me? What's the situation in 5.2 where the
function keyword wouldn't produce a function object?
In Lua 5.1, a call to function "foo" will create a new instance of function "bar" each time. Lua 5.2 will create only one instance if "bar" has the same upvalues each time.