4 comments

[ 1.9 ms ] story [ 18.6 ms ] thread
This is the configuration language that Google uses internally. It's used in Bazel (which was open-sourced from Google's Blaze) and, I believe, in many other places inside Google.

Unlike Google's Jsonnet, which doesn't seem to have become very popular, it goes way beyond mere declarative templating, as it's actually a minimal implementation of Python, complete with functions, lambdas, for loops, etc.

The Google documentation for Bazel's BUILD files provides some context:

    The concrete syntax of BUILD files is a subset
    of Python. Originally, the syntax was that of
    Python, but experience showed that users rarely
    used more than a tiny subset of Python's
    features, and when they did, it often resulted
    in complex and fragile BUILD files. In many
    cases, the use of such features was
    unnecessary, and the same result could be
    achieved by using an external program, e.g.
    via a genrule build rule.

    Crucially, programs in the build language are
    unable to perform arbitrary I/O (though many
    users try!). This invariant makes the
    interpretation of BUILD files hermetic, i.e.
    dependent only on a known set of inputs, which
    is essential for ensuring that builds are
    reproducible.
Your comparison with Jsonnet is not accurate. Jsonnet is thriving, now also has a Go implementation and lots of adoption especially in the Kubernetes community. It has nearly 1000 github stars. It is also a full programming language, and has all the features you listed.
I disagree that it's thriving! It's a pretty weird combination of a JavaScript-like interpreter with non-JavaScript stdlib and bizarre choice of keywords, for example, 'local' and not 'var'/'let,' etc. It's capabilities as a language are pretty limited, so, although at first sight, it looks great, it's pretty limited, and even Jinja2 gives you more, so, you see more and more people combining Jinja2 with Jsonnet, which is proof that it's doomed.
TOML, which is newer, has nearly 6.6K stars. Hjson has 1.5K, JSON5 has 1.8K, HCL has 1.2K, and ICL. At the same time, a newcomer such as ICL [1] has less than 10.

[1]: https://github.com/archipaorg/icl