
Design Patterns Part 1 – You Create Me!
Coding Blocks
00:00
What if You Could Subclass a Singleton Class?
There's a lot to get into here, right? So there's the static constructor that we talked about. There's another way that John Skeet had written about, which I actually found interesting when I stumbled across this article that he had, and we'll include a link to it in the show notes. Here's an example. Well, what if you've got like, we'll say, a singleton for like caching, right? And it might, you might want to have basically an abstract class for that that contains methods like flushing or stuff that's going to be common to all the children. So the children are all singleton. We'll come back to that.
Transcript
Play full episode