lua-users home
lua-l archive

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


>>>>> "Soni" == Soni \"They/Them\" L <fakedme@gmail.com> writes:

 Soni> We guess there's no way to make safe self-referential functions
 Soni> in Lua?

 Soni> local function x <const>() end -- doesn't work

Arguably the best thing to do here would be to make "local function"
imply <const> automatically; if you want the name to be a mutable local
var, then you can use

local x
x = function() end

The implication that a local function is const might provide scope for
more optimizations...

-- 
Andrew.