On Mar 31, 2:54 am, David Stanek <dsta...@dstanek.com> wrote: > On Mon, Mar 30, 2009 at 9:40 AM, jfager <jfa...@gmail.com> wrote: > > I've written a short post on including support for configuration down > > at the language level, including a small preliminary half-functional > > example of what this might look like in Python, available at > >http://jasonfager.com/?p=440. > > > The basic idea is that a language could offer syntactic support for > > declaring configurable points in the program. The language system > > would then offer an api to allow the end user to discover a programs > > configuration service, as well as a general api for providing > > configuration values. > > What value does this have over simply having a configuration file.
"Simply having a configuration file" - okay. What format? What if the end user wants to keep their configuration info in LDAP? Did the library I'm including make the same decisions, or do I have to do some contortions to adapt? Didn't I write basically this exact same code for the last umpteen projects I worked on, just schlepping around config objects? > In your load testing application you could have easily checked for the > settings in a config object. Not really easily, no. It would have been repeated boilerplate across many different test cases (actually, that's what we started with and refactored away), instead of a simple declaration that delegated the checking to the test runner. > I think that the discover-ability of > configuration can be handled with example configs and documentation. Who's keeping that up to date? Who's making sure it stays in sync with the code? Why even bother, if you could get it automatically from the code? > -- > David > blog:http://www.traceback.org > twitter:http://twitter.com/dstanek -- http://mail.python.org/mailman/listinfo/python-list