"Thompson, David" <dthomps...@worcester.edu> skribis: > On Wed, Jan 20, 2016 at 5:13 PM, Ludovic Courtès <l...@gnu.org> wrote: > >> To me, the question is more about choosing between writing configuration >> file bindings and exposing upstream’s configuration file syntax, as was >> discussed when Andy posted the Dovecot service. (To which I don’t have >> a better answer than: let’s see on a case-by-case basis.) > > How about this: > > Procedures that return services should accept file-like objects when > configuration files are needed. When it makes sense (like with > elogind, dovecot, etc.), we can provide special procedures that take a > Scheme data structure and "compile" that to a file-like object in the > service's native configuration language. This way, we allow ourselves > to have the high-level Scheme configuration APIs we like while also > allowing the use of "raw" configuration files in situations where it > is unavoidable or the path of least resistance.
I like it! When we provide Scheme data structures, we necessarily have a ‘foo-configuration->file’ procedure anyway, so it’s just a matter of exposing it. Ludo’.