Ideally the singleton example should implement the singleton pattern from the book 'Design Patterns'.
It should definitely not create 2 objects of the same class. That's just surreal.
local class = Class() local a = class.new() local b = class.new() a.name = "Singleton Pattern"