Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> So what's the author's proposed alternative?

I am the author. It depends on your purpose; in general, I would say "the simplest solution that meets all needs", where "all needs" depends on what you're doing. In Python, this could be the configparser module, or parsing a Python file (again, depending on requirements).

As a matter of taste, I prefer minimal syntax. I wrote a library with this syntax a while ago[1], although it's clearly not the best solution for every case.

I should probably write a separate article about this.

[1]: https://github.com/carpetsmoker/sconfig#what-does-it-look-li...

> Lack of comments: not an issue with JSON5.

JSON5 isn't JSON though. It's JSON5. None of the standard JSON parsers can deal with JSON5, you need a different JSON5 parser.

> I think it's pretty readable

A matter of taste.

> just edit it with an editor that points at the errors quickly

It seems to me that having to rely on such tools for issues such as this is not a great idea, especially not if it's easy to do better.

> I can't think of a possible alternative format where escaping isn't required at all.

There is a difference between "escaping isn't required at all" vs. "having to constantly and awkwardly escape a commonly used character".

> Lack of programmability [..] VS Code seem to be doing fine without this.

I've not used VSCode, As I'm a Vim guy. I can't imagine configuring Vim with just declarative configuration as so many useful parts come from being able to program Vim. This could be separated out to just an "extension" or "plugin" system, but I really like being able to just stick one or two lines of code in my vimrc and have it do something really useful, without writing a full plugin.



for my tastes, sconfig is the opposite of human readable. IMO, JSON is good enough for the average cases of configuration files.


I'm curious why you would consider it to be "the opposite of human readable"? It has a minimal of syntax to parse, so at least in my view that should make it easier, rather than harder?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: