Interesting approach to the singleton pattern in Joshua Bloch's book 'Effective Java' 2nd edition.
public enum Singleton {
INSTANCE;
}
This simple idiom solves a lot of non-trivial problems, as synchronization or serialization. I do really like this approach -I had never thought about this option.
What about you?
Thursday, February 9, 2012
Subscribe to:
Posts (Atom)
State machines in JS
You can read in previous blog posts the reasoning behind state machines: they simplify and unify the way we define states and transitions i...
-
This is the first post. Let's hope it's not the last one :-)
-
Not bad. I started the project after my last post. That means less than 3 weeks. Done in my spare time, when commuting to work. In tram 4. M...