[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: questions about closure construction
- From: Roberto Ierusalimschy <roberto@...>
- Date: Tue, 19 Mar 2013 14:20:02 -0300
> 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