Is there a way to make like a template singleton class so that when you extend it, the extended class is also a singleton class, so I can quickly make a new singleton class just my extending the template singleton class? I am using ActionScript 3.0 if it matters.
Thanks.
The singleton pattern is designed in such a way that the type ought not to be inherited. I am not familiar with ActionScript but having an singleton type that is also able to be extended seems like a mistake.
If you were to do this then that would mean that the parent and child types could both have their single instances loaded into the same application. Since the types are, polymorphically, of type
Parent,Parentwould technically no longer be a singleton.