Hacker News new | ask | show | jobs
by Almaviva 5454 days ago
One benefit is that you can replace the singleton instance with a mock or subclass for testing if you need to.