What does HackerNews think of config?

configuration library for JVM languages using HOCON files

Language: Java

YAML allows comments, I'll give it that. But what I really want is splitting configuration into multiple files that can be imported to others. And substitutions. Basically HOCON known on the JVM as https://github.com/lightbend/config
Yes! I logged in just to mention HOCON, then I noticed you have mentioned it already :- )

So, the project you linked to is Java / Scala: https://github.com/lightbend/config

And there're also (basic? complete?) HOCON parsers in Javascript and Rust — I investigated this a while ago, because I want to use HOCON everywhere in my projects:

https://docs.rs/hocon/0.5.1/hocon/ (Rust)

https://www.google.com/search?q=hocon+javascript (Js, a few different)

The Rust version:

> This implementation goal is to be as permissive as possible, returning a valid document with all errors wrapped in `Hocon::BadValue` when a correct value cannot be computed

How nice :- ) (it seems to me)

I agree with HOCON being nice based on personal usage but I haven't seen an in depth analysis of it. This is the canonical parser for JVM based languages — https://github.com/lightbend/config, are there many other implementations that are widely used?
Another potential option, is Lightbend Config

https://github.com/lightbend/config

It adds includes/inheritance, substitutions, unit of measure parity , comments , and few other things -- on top of JSON.

does not have if-logic, loops, or arbitrary functions, however.

On plus side, the library is available in a number of languages, easily embeddable. And there is an IntelliJ plugin for it, to color the syntax of the config files.

I agree. Webpack's approach is great, but only for JS projects.

For Scala (or any other JVM environment) I use https://github.com/lightbend/config. It doesn't get better than that.

For more complex config, I highly recommend HOCON (https://github.com/lightbend/config/blob/master/HOCON.md), and its parser in Java (https://github.com/lightbend/config).

It feels like Scala (Lightbend is the company behind Scala) in the sense that there are 100 ways to achieve the same thing and having different levels of "code elegance", but for me it's a plus, since I'm a Scala fan.

If you want a JSON-ish config format, I'd recommend to check out HOCON [1], basically a superset of JSON that fixes all he things that make it annoying for config files.

[1] https://github.com/lightbend/config