[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] Lua 5.4.0 (alpha-rc1) now available
- From: "szbnwer@..." <szbnwer@...>
- Date: Sat, 8 Jun 2019 12:32:58 +0000
tl;dr: nothing much important here, its safe to move on :D
Coda:
> the expression is evaluated BEFORE the new identifier is added to the scope.
u r right! :)
i forgot about that even after i had that lesson way back in time,
when a recursive function worked only in the global namespace (in the
`local x=function() x() end` form... i even wanted to yell on lua-l
about it, but then ive seen that its well documented :D (as `local
function y() end` is actually `local y; y=function() end`))
so now i dunno how to imagine `<static>` variables... :D
otherwise i still like both upvalues and holding state in a table for
such needs :D (furthermore we have coroutines for "static" variables
(or state - better said), that i used only once when tekui asked for
it, just i prefer iterators for these kinda tasks...)