You are reading a single comment by @rigrig and its replies. Click here to read the full conversation.
  • I was thinking about adding simple Settings library, just something like
    require('Settings').get('app.settings.js­on', 'option.to.get', 'default'); and
    require('Settings').set('app.settings.js­on', 'option.to.set', 'value');

    Probably wouldn't be much work to implement, but we could get rid of (almost?) all of the defaults-handling boilerplate in apps.

    • Does this seem like a good idea, or would it add too much overhead for apps? (I think it would be ok, as they are already loading+parsing a settings file anyway)
    • Having a separate library just for two functions feels a bit cluttery, maybe a "Core/Standard/Basic/Bikeshed" library with getSetting/setSetting would be better? (I can't really think of similar functions right now, but going through all apps to change it later would be a shame.)
About

Avatar for rigrig @rigrig started