lua-users home
lua-l archive

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


> That references 3.4.3 here:
> http://www.lua.org/manual/5.2/manual.html
> 
> """Closures with the same reference are always equal. Closures with
> any detectable difference (different behavior, different definition)
> are always different."""
> 
> I'm not exactly sure what "the same reference" means. This appears
> to be a tautology.

It is a sort of tautology. We wanted to express that if you copy a
reference to a function from one variable to another, they are both
equal:

a = function () ... end;  b = a;  assert(a == b)

-- Roberto