Skip to main content

All Questions

6 votes
6 answers
5k views

Should constructors ever be used only for side-effects?

Summary: Why is it wrong to design a constructor only for its side effects, and then to use the constructor without ever assigning its return value to a variable? I'm working on a project that ...
Brian H.'s user avatar
  • 179