David Masover
7/26/2008 4:50:00 AM
On Thursday 24 July 2008 14:25:09 Thomas Sawyer wrote:
> YAML would seem to be the obvious choice. But I hesitate because Syck is
> a fairly heavy dependency for something like Rolls where light weight is
> a big advantage.
YAML is also in the standard library, so if you're targeting anything
resembling a standard distribution of Ruby, it'll be there.
> Also automated manipulation of YAML files isn't all
> that optimal --round trip a YAML file and formatting can become fairly
> distorted.
Because YAML is a serialization format. They make good config files, but do
you really need to support comments in the file? Your other proposal doesn't
seem to allow for that, anyway...
> The
> downside of course is that a dozen of so little files can seem a bit
> unwieldy and can waste file system space (depending on block size).
My attitude is, do what's convenient, and let the filesystem worry about disk
space. Some filesystems support concepts like "sub blocks" and "tail packing"
which can lead to quite efficient storage of small files.
Worry more about the usability of it. If you litter the project with small
files, is that going to be annoying for users? I know one of the selling
points of git over SVN is that git stores one .git folder at the top of the
checkout, whereas SVN stores a .svn folder in every directory of the
checkout.