From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: <20110203165859.E501C5B66@mail.bitblocks.com> References: <201102031245.33842.dexen.devries@gmail.com> <20110203165859.E501C5B66@mail.bitblocks.com> Date: Thu, 3 Feb 2011 17:13:23 -0600 Message-ID: From: Eric Van Hensbergen To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [9fans] files vs. directories Topicbox-Message-UUID: abfa6a92-ead6-11e9-9d60-3106f5b1d025 On Thu, Feb 3, 2011 at 10:58 AM, Bakul Shah wro= te: > On Thu, 03 Feb 2011 12:45:33 +0100 dexen deVries =A0wrote: >> >> why do we keep distinction between files and directories? > > David Cheriton's `thoth' operating system didn't keep this > distinction. But every other OS I know of keeps them > separate. =A0IIRC thoth provided functions for getting the > first child or next sibing given a path name. [Cheriton used > words like father, son, brother -- this was pre-PC!] > >> Does it provide any extra value over model with unified file/directory? > > They serve functions. A directory is an associative table, > indexed by a string key. A file is an array, indexed by an > integer. But most filesystems do store some attributes with a > file thus breaking this simple model. > > One advantage of always storing a directory with a file is > that you can represent file attributes via a directory. =A0Then > you can have an extensible attributes model. =A0XML probably > maps well to this model. > > Not sure doing so in plan9 makes any sense but you could > build an experimental OS around it! But if you go this path, > do consider providing a few more datatypes in the filesystem > (integers, file-id, strings, ...). =A0Basically persistent data > types. Or just use an object or relational database as your > filesystem. > I'd tend to agree with this sentiment. I think, particularly in the construction of synthetic file hierarchies as interfaces, the tendency to do what is expected (from a disk file system perspective) often gets in the way of the sensible interface. The world has become considerably richer than collections of byte-stream files, yet we have no way of notionally representing richer structures in the name space. I've actually got some words on this in a position paper I've been crafting, I'll try to get it out posted to my blog before too long. -eric