MessiahAndrw wrote:
For example, an image file could contain the following streams:
Name: name of the file
Date Created
Date Modified
Permissions
Image Compressor: e.g. JPEG
Image Quality: e.g. 60%
Image Width: e.g. 1024
Image Height: e.g. 768
Image Description: e.g. A picture of a house.
JPG Stream: Raw JPEG stream goes here..
I think that's the type of "metadata in the small" that people always concentrate and that's more or less useless. Things like image sizes, even the creator of the file, or whatever, are best stored into the file data itself. Most file formats have headers for all that info anyway, and it works fine, and you don't need to parse the whole file anyway, just grab the header and see that's in there. This kinda of data applies to all copies of the file. Sure, there might be copies with more/less data around, but generally speaking if you copy a file somewhere else, this kind of metadata is still valid.
Things like name of the file, permissions, dates... these are things that are relevant to this particular copy of the file. There's tons of reasons to have a the same file in different places with different name or permissions, so they aren't really part of the file itself, rather just something that describe this particular copy. If you wanna add something here, add MIME type. It's really part of the file itself (all the copies), but how do you tell the type if you don't know how to read the file?
The type of metadata that I'd add if I wanted to mess with file storage concepts, is relations between files. Say, it would be nice to have the filesystem know that 'dog94t.jpg' is a thumbnail of picture 'dog94.jpg', or that looking at 'ontherun.mp3' the next track is 'time.mp3' and the previous track is 'speaktomebreath.mp3'. Apps can do that kind of stuff right now, but they'll have to maintain their own indexes for that. Or how about more dates? What if I have 'projects2007-11.xsl' and I know it's missing something, and I'd like a list of all files that I modified November 2007, whether or not I've also modified them afterwards. Actually, keep the old versions as well, so I can look at what those files looked like on December the 1st, but let me search the web pages (full text please, don't I don't need those from google.com, thanks) I browsed last month, 'cos I solved a problem and I need to do it again but forgot the solution. Or howabout a listing of all files that were installed by the same program that installed 'foobar.exe'? All the files created by 'foobar.exe'?
That kind of stuff can be useful in practice, but unfortunately aren't exactly trivial to do..
[edit] Oh and caching stuff from the file itself (like some of what you listed) is waste of effort if you store it where the file is. Better store it into a separate index, so you can search by that stuff. When you have the file already, you can just as well look into it's internal headers.
The real problem with goto is not with the control transfer, but with environments. Properly tail-recursive closures get both right.