3 ms·
I don't know the precise reasons for the Gnome developers choosing to go with a binary format, but there are some fundamental (and well understood) constraints
by mhw 15y ago
I don't know the precise reasons for the Gnome developers choosing to go with a binary format, but there are some fundamental (and well understood) constraints that you're working within. First of all, can we just take it as read that the majority of users will prefer to modify the configuration of their GUI using a GUI? This means that your application needs to be able to both read and write the configuration file format.
Now, if your configuration file is textual, power users will want to edit it by hand. Look at the rest of this thread for evidence. This means that your application needs to be (more) robust in the face of errors in the configuration file syntax. Not insurmountable, but it's a bit more work. It would be good if your application recognises when the configuration file has been altered too, and reread the configuration so people don't have to restart the application.
Power users will also want to version control the configuration file, and compare different revisions to see what has changed. This means that when you write out the configuration file you need to preserve the textual structure and ordering of the elements from when you read it in. The power user reordered the settings to group things in away they consider more logical? Your configuration file editor needs to preserve that.
Most plain text configuration file formats also have some way of adding comments, and you'll need to preserve that. Oh, and all that whitespace that's not significant to your program but is significant to your typical power user.
So the problem is pretty much comparable with building a syntax-aware text editor for programming languages. There was loads of research done on those (Google 'syntax directed editor') and their success can be measured by the fact that lots of programmers still choose vim, emacs, textmate and other plain text editors precisely because they don't try to do anything clever with your text. Eclipse and similar IDEs are probably the closest you get to a syntax directed editor these days, and they've still stuck to the plain text editor user interface.
More sophisticated attempts to round-trip from program source code to editable UML diagrams or GUI layouts and back are routinely laughed at by the power users that you're hoping to win over with your clever plain text configuration file system, so don't think they'll be an easy audience to please either...