3 ms·
There is no need for a database. File updates are atomical. Editors rewrite the whole file. Also the tools argument just isn't true. A well designed plain text
by jstimpfle 10y ago
There is no need for a database. File updates are atomical. Editors rewrite the whole file.
Also the tools argument just isn't true. A well designed plain text format is easier to parse with a one-off parser than with ugly one-off SQL queries. The reason that not many GUIs exist for plain text formats is that they are already designed to be easy to use. There are few cases where GUIs make sense.
From the top of my head, the only configuration GUI I regularly use is firefox's. Not that it wouldn't be possible to come up with a clean plain text design that would be easier to use.
Also most of the stuff is not represantable as relations. I'm looking forward to see how you encode a shell command in relations.
- JdeBP 10y agoThere's more to atomic updates than "rewrite the whole file", note. The way that text editors usually rewrite whole files in place, preserving hard links, is most definitely not an atomic update.
- jstimpfle 10y agoThe typical way to do it is to write a new file. Not that it would matter in practice for configuration files.
- tdicola 10y agoSo what happens when your 'atomical' text update tool reads in the text file to memory, makes some changes, then the file changes on disk from another unrelated process, and your tool writes the file back out losing the previous changes?