Hi to all! I just wondering, is any differences between next to functions, especially in their visibility outside.
Let’s imagine, that we have some file, which we call from outside outside
local temp = {} return temp
And we create to function inside
function temp:funcOne () -- DO something end temp.funcTwo = function () -- DO something end
Is any difference? Because as I know we can call both of the function by following:
-- some file local var = require ("temp") -- got all table with two functions inside -- First way var:funcOne() var:funcTwo() -- Second way var.funcOne() var.funcTwo()
Only differences I see is a syntax, but what actually happend?