Would HOCON serve as an alternative to TOML

Ibn Saeed
Message ID
DKIM signature
Download raw message
Message ID
<0472f830-d2e8-4491-9357-1512fe4adeeb@localhost> (view parent)
DKIM signature
Download raw message
On 4/5/20 7:53 AM, Ibn Saeed wrote:
> https://github.com/lightbend/config/blob/master/HOCON.md#goals--background
HOCON definitely has some interesting ideas. However,

a) I'm not sure if it's much more human-writeable than plain JSON.
b) there are no ready to use OCaml libraries
c) JSON parsing is itself a minefield, but HOCON makes it even harder to
parse than it already was
d) since there's no formal specification of its grammar and behaviour,
it's even harder t

TOML isn't perfect, but at least it takes care to specify more things
than JSON (or HOCON) do, like whether trailing commas are ok or not.

There are some interesting points in TOML's spec too of course, for
example, it says that adding keys to an inline table using the dotted
key syntax is not allowed, which requires the parser to remember which
of the three syntax variants a table was defined with, while the benefit
for the user is dubious at best.
But overall it seems like a good compromise between readability/ease of
learning and flexibility to me.