Hacker News new | ask | show | jobs
by mattgreenrocks 5534 days ago
My personal approach is singletons make sense only when:

1. There should be one instance of the data and

2. The data needs to be lazily initialized.

Otherwise, you might as well drop the facade and use globals.