lua-users home
lua-l archive

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


I would probably remove/change global by default; all the rest is quite handy.

Em sáb, 8 de set de 2018 08:32, Dirk Laurie <dirk.laurie@gmail.com> escreveu:
Op Sa., 8 Sep. 2018 om 07:26 het Axel Kittenberger <axkibe@gmail.com> geskryf:

>> It would break everything, but I'd remove the top-level function keyword entirely, with the side effects. 2 more keystrokes for `=` in free functions, plus 4 for `self` in methods.
>
> The issue is with recursive functions. You can't do that simply with the "name = function()" syntax.

Oh, you can. "local function func(...)"  is syntactic sugar for

local func
func = function(...)

I'm sure this is in the manual, but don't have it open in my browser right now.