lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

The Lua 5.2 manual says:

> Equality between function values has changed. Now, a function definition
> may not create a new value; it may reuse some previous value if there is
> no observable difference to the new function.

This remark says "may". It is surprising that in the simplest possible case,
it does not happen.

$ lua
Lua 5.2.3  Copyright (C) 1994-2013, PUC-Rio
> x=function() end; y=function() end
> print(x==y)
> print(string.dump(x)==string.dump(y))