Comment

Comment by fdsary

Choosing a unified format for configurations is an interesting task, because they all suck a lot (hehe). XML is too verbose to be nice to work with. Plain text files with config flags delimited by newlines lead to the program in the end implementing a small scripting language for config files.

JSON is pretty nice, but also a bit clunky. A lot of {:} all the time.

Personally, I think the nicest and most expressive way is S-expressions. I'm no lisper, but you have to admit sexprs are expressive, easy to read, and can be run as functions if the program knows lisp.

    {  
    "configFiles": "in JSON",  
    "wouldLook": {"like":"this"}  
    }  

    (while sexpr
      (could look)
      (even nicer))
parent fdsary 12 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton