[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: proposal: extend table constructors
- From: Dirk Laurie <dirk.laurie@...>
- Date: Sun, 4 Nov 2018 21:27:47 +0200
> { -- starts a new local context (closure)
> [: ref0 = 'k1'] = : ref1 = v1, -- ['k1'] = v1 and set external ref0 = 'k1'
> [: ref2] = v2, -- [1] = v2 and set local ref2 = 1
> [:local ref3] = v3, -- [2] = v3 and set local ref3 = 2
> [:local ref4 = 'k2'] = :local ref5 = v4, -- ['k2'] = v4 and set local ref4 = 'k2', local ref5 = v4
> [:local ref6 = 'k3'] = : ref7 = v5, -- ['k3'] = v5 and set local ref6 = 'k2', external ref7 = v5
> k4 = ref0, -- ['k4'] = 'k1'
> [ 'k5'] = ref2, -- ['k5'] = v2
> ref1, -- [3] = v1
> } -- close the local context
Why is this better than writing it out in plain Lua that everyome can
already understand?