On Tue, Sep 26, 2017 at 3:25 AM, mathieu stumpf guntz <
psychosl...@culture-libre.org> wrote:
> So in Lua, as far as I can say, there is no way to express directly
> something like `a = {b=1, c=a.b}`.
>
Well, if your data is read-only you could do `a = { b = 1 }; a.c = a.b`.
> Moreover, `a.c =
Hi,
So in Lua, as far as I can say, there is no way to express directly
something like `a = {b=1, c=a.b}`.
Instead one might use functions, and call the table with the instance
method call operator (colon), like
`a = {b=1, c=function(s) return s.b end}; a.b == a:c() -- true`.
A first minor