Re: DogCows or Polymorphism in the Hurd
Bas Wijnen <shevek <at> fmf.nl>
2006-02-03 09:55:21 GMT
On Thu, Feb 02, 2006 at 01:56:50PM -0500, Marcus Brinkmann wrote:
> here is a small issue to ponder. I'd like input on this.
> However, it happens that in Unix, Directories and Files are not only
> very distinct objects, but they are also understand by a wide range of
> applications simultaneously. Ie, many applications look at a node in
> the filesystem, decide if it is a file _or_ a directory, and then take
> an appropriate action. All applications that can traverse a filesystem
> belong into this group, for example ls, rm, grep, find, etc. This is
> the most prominent group, but I would expect there to be isolated cases
> of other applications that do this (maybe Apache? Input welcome here).
Huh? Why? I'd say it's quite clear that there is a huge number of
applications which fall into this category. Everything that has a file->open
dialog for example. This group is so large that IMO it's undoable to make a
(possibly small) change in all of them.
> Using the poly-type approach would remove all ambiguities: Applications
> would either see a file or a directory, but not both. Applications who
> _know_ about hybrid types can use the new functions to switch facets
> explicitely. If a user wants to use an application with a hybrid type,
> he will have to make his intent explicit by providing the node with the
> right facet type to the application.
This sounds good. I think I would like to have the creation of the nodes with
other facets (so the creation of "foo" when "foo.tar.gz" exists) explicit.
That is, the user has to do it. Otherwise there will be too many name space
collisions. For example, it is usual that a foo.tar.gz unpacks a directory
called foo and files inside it. If that directory and those files already
exist, strange things will happen when a script unpacks it, possibly removing