Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

6
  • 8
    Similar to Properties.Settings.Default in .NET. Commented Dec 5, 2011 at 2:21
  • 11
    @Paul, The "no-singleton camp" will state that the configuration object should simply be passed into functions that need it, instead of making it globally accessible (aka singleton). Commented Jun 25, 2014 at 1:49
  • 3
    Disagree. Should the configuration be moved to the database, everything's screwed. Should the path to the configuration depend on anything outside that singleton, these things need to be static too. Commented Aug 28, 2015 at 21:01
  • 3
    @PaulCroarkin Can you expand on this and explain how this is beneficial? Commented Apr 19, 2017 at 23:55
  • 2
    @rr- if the configuration moves to the database, it can still be encapsulated in a configuration object which will be passed into functions that need it. (P.S. I'm not in the "no-singleton" camp). Commented Apr 6, 2020 at 15:56