Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Closures and Objects Are Equivalent (2013). Parent comment
It's a good thing Lua doesn't have objects!
Because in Lua, you can call a table if it has a `__call` metamethod, this is valid Lua:
(setmetatable({a = 5}, {__call = function(t) return t.a end}))()
There are no comments on this comment yet.
It's a good thing Lua doesn't have objects!
Because in Lua, you can call a table if it has a `__call` metamethod, this is valid Lua:
which returns 5.