(no title)
TheFattestNinja | 2 years ago
1) It helps with encapsculation of race conditions (you don't need to acquire locks outside to do if(get==null) { create } when you can have it in the function itself)
2) I normally don't care in my code if this is a pre-existing instance or one that I just created. I just want it now to use.
I personally find this approach superior to CQS.
No comments yet.