back

by rbanffy·17y ago·view on hn ↗
Wouldn't it be nice if OSX kept its settings in text files under /etc like any civilized OS should?
1 comments
No, because then there wouldn't be such a nice API for managing live settings from within the programs themselves:

http://developer.apple.com/DOCUMENTATION/Cocoa/Reference/Fou...

And why exactly would keeping the settings human readable prevent someone from developing a nice API for managing them?

Oh... It wouldn't

Mac OS X preferences -were- human-readable (and editable), but that's not what makes the NSUserDefaults API so handy. What makes NSUserDefaults handy is the support for varying default domains (network, system, user) and dead-simple serialization of Objective-C basic types (strings, ints, dictionaries, arrays).

Additionally, Apple switched to a binary file format to improve performance in 10.5, which may be converted to/from the text format, or edited directly using the property list editor.

There's also nothing stopping a software author from documenting their settings file keys, and some do. However, most of the settings options you do see listed on that site are undocumented because they are unsupported.