The funny thing is that all of these examples are valid Oil syntax [1], since I added Ruby-like blocks with { } to shell. A block can be evaluated to a JSON-like data structure, e.g. this:
server foo {
port = 80
root = '/'
section bar {
...
}
}
could become: {name: "foo", port: 80, root: "/", "bar": { ... } }
And you can use if statements and loops to generate repetitive structures! Rather than using textual templating.(The syntax is all there, but the evaluation is incomplete -- contact me if you want to help, and influence the API/language design)
-----
The shell is a logical place for configuration, because shells start processes that need configuration. Configs are often passed in as environment variables or flags.
The syntax can support:
title "Hello World" # like SDLang
in addition to title = "Hello World"
although I'm still wondering if we should enforce one or the other for consistency. The latter is more flexible in Oil because you have arbitrary expressions on the RHS.