Re: Parenless calls for function literals
"'TopchetoEU' via lua-l" <[email protected]> Fri, 29 May 2026 11:59:59 +0000
| Newsgroups | gmane.comp.lang.lua.general |
|---|---|
| Message-ID | <KiWfB38IJS0NIxdAOJ01HXAKsDJHxhDZGNpQAi8zuUD6741WTtDrmaBKZdGuuAV_CVU7WutVzvse9ZKN_p0LI3LjT0DFu_O1Cl1F4D367a4=@proton.me> |
IMHO, doing it like this is quite cumbersome, as you need to keep track of global state, which gets messier the bigger the code gets. With my syntax, you get all the benefits of passing a callback to the callee. On Thursday, May 28th, 2026 at 9:30 PM, 'Sainan' via lua-l <[email protected]> wrote: > function it(name, func) > units[unit_currently_describing][name] = func > end > > -- Test code > describe "Foo" do > it("1 is true", function() > assert(1) > end) > end -- You received this message because you are subscribed to the Google Groups "lua-l" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/lua-l/KiWfB38IJS0NIxdAOJ01HXAKsDJHxhDZGNpQAi8zuUD6741WTtDrmaBKZdGuuAV_CVU7WutVzvse9ZKN_p0LI3LjT0DFu_O1Cl1F4D367a4%3D%40proton.me.