local module_1 = {} -- This name can be anything module_1.new = function(_x,_y) -- create a table dynamically with the "new function" local obj = {} obj.x = _x obj.y = _y obj.pp = function(self) print(string.format("(%d,%d)", self.x, self.y)) end return obj end return module_1