Live data from Hacker News

TOML – Tom's Obvious, Minimal Language

toml.io

161–163 of 163 posts

Re: TOML – Tom's Obvious, Minimal Language

#161

Earlier quoted context omitted.

JSON should be banned for configuration, if only for the fact it doesn’t support comments.

Use HJSON, json with comments that doesn't kill you for a trailing comma. All the benefits of JSON, no new syntax to learn, easy to fit in place in new or existing systems. https://hjson.github.io/

Seems better than Json5.

All languages should make unnecessary characters optional like trailing semicolons and commas.

Re: TOML – Tom's Obvious, Minimal Language

#162

I hope this catches on some more. I'm tired of being bitten by all the issues that I encounter with yaml configs.

Just bring up Toml to be used for your next project whether it's open source or company project. That's how things get more popular.

Re: TOML – Tom's Obvious, Minimal Language

#163

Of configuration file formats, TOML is my favorite. It hits the right balance of power and simplicity, it's been able to handle my needs with minimal effort and fuss. I tried Python's INI for configuration, but it was both too simple and too complex at the same time, very frustrating. YAML is a nightmare, the formatting is way too easy to get wrong and accidentally break your configuration. JSON is too strict/simple.…

For a typescript project, after going from .ini and .toml I figured I'd just write config file in typescript. You'd get all the type hinting, auto completion and error checks.

I never liked that anything I pulled from a config file was never checked by typescript, so I just went simple with TS itself.

I understand if I use another language within the same project, it'll be a problem but until then this can't be beaten.

Post reply on HN