~dmbaturin/soupault

1

Would HOCON serve as an alternative to TOML

Ibn Saeed
Details
Message ID
<0472f830-d2e8-4491-9357-1512fe4adeeb@localhost>
DKIM signature
pass
Download raw message
https://github.com/lightbend/config/blob/master/HOCON.md#goals--background
Details
Message ID
<395a6709-d79e-e839-bf65-d1b00e1e0247@baturin.org>
In-Reply-To
<0472f830-d2e8-4491-9357-1512fe4adeeb@localhost> (view parent)
DKIM signature
pass
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.