Details
-
New Feature
-
Status: Closed
-
Major
-
Resolution: Won't Fix
-
None
-
None
-
None
-
None
Description
The singleton pattern has become a standard tool in almost any Java program. It is used to:
- Create constants
- Lazy load expensive classes
The current implementations suffer from:
- A whole lot of code to implement the singleton
- Synchronization issues
- Testing issues
I have attached an example syntax to make singletons first class citizens on Groovy.