top | item 42038563

(no title)

cirwin | 1 year ago

Funnily enough, I've been working on solving the same problem concurrently. Though in my _very_ biased opinion; I think CONL is easier to read and write:

https://github.com/ConradIrwin/conl

  value = example

  map
    a = b

  list
    = 1
    = 2

  multiline_value = """bash
    #!/usr/bin/bash
    echo "hello world"

discuss

order

lifthrasiir|1 year ago

Agreed that this is much better than the OP. That said, my general opinion is that a whitespace-only indentation should be avoided especially in the serialization format due to the inherent ambiguity of whitespace characters and resulting human mistakes. When I designed CSON [1] I strived to make it as readable as possible without the indentation for that reason.

[1] https://github.com/lifthrasiir/cson

cirwin|1 year ago

Nice – I like your verbatim syntax for multiline strings!

I went with indentation because a very common use-case in a configuration file is commenting out lines. Even with CSON-like comma rules, you still need to balance your {} and []s. Indentation balances itself most* of the time.

GeneThomas|1 year ago

Indentation in xᴇɴᴏɴ is optional and for readability.