in Lua:
`(function()end)() == nil` is true but
`(function()end)()` and `(function() return nil end)()` print different things at the REPL
@grainloom huh, in ruby a void function just returns nil:
def nnn
nil
end
# => :nnn
def voidvoid
#noop
end
# => :voidvoid
nnn # => nil
voidvoid # => nil
nnn == voidvoid # => true
@bonzoesc yuh, in Lua there is actually a stack for the return values or something
in Python, you can return multiple things but it's actually just syntax sugar for returning a tuple, whereas in Lua you are pushing things onto a stack
eg. you can do
local a, nil1, nil2 = (function()return 1 end)()
-- a == 1 and nil1 == nil and nil2 == nil
@grainloom yeah, ruby does the destructuring assignment like that (but with Arrays since no tuples)
not sure how i feel about it all, kinda neat that all these languages found different things to work for different people