__call vs Module.New

What’s your opinion on doing

local newObj = Module()
instead of
local newObj = Module.New()

But still having functionality such as Module.Destroy(newObj) (and of course newObj:Destroy())
?

1 Like

I think this doesn’t really matter too much either way as long as you are consistent with what you do in your game. I would personally use Module.New() as it seems more obvious what is happening at first glance. You don’t have to be aware that __call is being used to be able to understand what is happening so if you were working with another programmer they might find it easier to follow.

7 Likes