• Laser@feddit.org
    link
    fedilink
    arrow-up
    4
    ·
    edit-2
    5 hours ago

    I think that fundamentally, a system-wide configuration database isn’t necessarily a bad thing, eapecially with types. It sounds saner than using text with its pitfalls, especially if the format itself sucks (YAML and XML to an extent)

      • Laser@feddit.org
        link
        fedilink
        arrow-up
        1
        ·
        6 hours ago

        I would agree that JSON is indeed one of the lesser evils, i definitely prefer it over YAML and XML (yes, the latter has schemas…) though there are some things I dislike about it for configuration. Which is fair because it’s a serialization language. But man I could really do without string quoting keys and the no trailing commas (again, fine for serialization), and sometimes I could really use proper comments or references.

        There’s a reason there are so many extensions. JSONC, JSON Schema, JSON References, JSON Pointer, JSON5, J8, all because people want to use it for their purpose… it’s a bit of bastardization, but still better than YAML.

        For most user facing configuration purposes, TOML is probably the better choice. But again, I think ultimately the central database approach is better. And while a filesystem is a database, the logic is broken once you put keys into the files.