Re: Function statement name syntax in Lua
Roberto Ierusalimschy <[email protected]>
| Newsgroups | gmane.comp.lang.lua.general |
|---|---|
| Message-ID | <[email protected]> |
> Let me create more ugly example:
>
> self = {}
> function self:self() return self end
> print(self:self())
>
> What "self" is returned here and _why_?
Once you expand all sugar, that statment becomes this:
self["self"] = function (self) return self end
It is not that complicated, but too much sugar is bad for our health.
-- Roberto
--
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/20260202185857.GA10552%40arraial.inf.puc-rio.br.