5 ms·
I had precisely the same reaction. I'm used to seeing singletons in the context of Java. The reasons to want a singleton pattern seems obvious to me but I wou
by olleicua 14y ago
I had precisely the same reaction. I'm used to seeing singletons in the context of Java. The reasons to want a singleton pattern seems obvious to me but I would only describe it the way its classically described if I was using a crappy language like Java. In Ruby or Python you just call it class that never needs to be instantiated (and it looks way cleaner). Then I see we're talking about PHP and my reaction is if your doing something complex enough to need a singleton then why aren't you using a real language?
- mikeschinkel 14y agoIf they goal is to target the WordPress user base then the question of "why aren't you using a real language?" is moot.