S-expressions have keywords, and don't require commas between list elements. That alone goes a _long_ways towards making s-expression based languages way more readable/writable than a similar datastructure encoded in something like JSON or YAML.
Here's an example of a JSON coded query taken from a PuppetDB tutorial (PuppetDB uses a very lispy query language):
why are you encapsulating everything in lists for your yaml example? you arent in your other examples either?
- filters:
- operant: =
type: user
- operant: =
title: nick
if the module author wants to, he could even remove the secondary list because its the same operator, making this
- filters:
- operant: =
type: user
title: nick
thats just as readable as your other examples imo.
yaml doesnt have to be an unreadable mess. its just possible to make bad apis, which remains true for yaml just as for any other format.
Thanks for example and explanation, this makes good sense. I apologize if this is a naive question but is there a reason we don't see configuration management taking advantage of S-expressions?
Here's an example of a JSON coded query taken from a PuppetDB tutorial (PuppetDB uses a very lispy query language):
And the same code as you could write it in native s-expressions: ...and one way you could encode it in yaml...