From one point view it's cool, from another it will force us to cover
all corner cases like SSL, IMAP, etc, as you did below. The problem is
that in some software, potentially, it can be much more difficult than
hardcoding 4 options.
Imagine such example with camel case:
(true-type-font? . true) will produce TrueTypeFont? = True, but it could
In this case it would make more sense to use (true-type-font? . #t),
be that boolean value must be true in that config format. We can
serialize cars and cdrs differently, but what if the grammar of the
target format is quite complex and we can't be sure if it's a value or
key?
If the grammar is very complex it just makes more sense to have an
“escape hatch” and let the user provide an opaque string or read from an
extenal file.
In this case, the format of the mbsync file looks pretty well-defined,
mbsync(1) lists all the available options.
I'm not sure if we really want to play this game with converting cases.
Yes, it does give esthetic look, but for what price.
Most (if not all) of the services that provide Scheme bindings for a
configuration so far have an ‘uglify-field-name’ procedure, or some
equivalent thereof. The same is true for Guix proper, I don’t see why
we should break this convention.
WDYT?