Interesting.. Last time a thought about this I figured that a solution could be to split identity from location.
That is, the location of a file is currently part of its identity, so when you moved it, all links that refer to it break. If, however, all files where given a unique identifier (a GUID for example), and there where a master index mapping files (via ID) to their location, links would then just keep working unmodified however you moved the files. An equivalent problem (IIUC) is to copy an object graph. Here, the straightfoward solution is to index all objects into a sequence, represent all links as indices into that sequence, copy the sequence, then rebuild the links easily from the indices. Here you can see that identity (the index into the sequence) is split from location (the storage of the object). Most typical graph representations merge both by having links refer directly to the related objects (such as having a pointer to it), so the solution to the copy problem is to decompose that. For this reason, I often represent object graphs explicitely that way: all objects are stored in a sequence container and links are just indices. I do realise of course that maintaining a gigantic master index of all files is not applicable to the real world, but nonetheless I think the general form of the solution (split identity from location) is worth being considered. Best On Tue, Oct 7, 2014 at 9:22 AM, Attila Lendvai <[email protected]> wrote: > i think the source of the problem usually is that references are not > encoding the intention properly (certainly in the case of symlinks). > > let's consider references in the context of e.g. a computer programs: > in prevalent programming languages/systems a call site is referencing > a function by a string (by the function's name), which is resolved in > one of the phases in the complex process of executing the program. > > this is a good example of lost intention. consider computer programs > as what they really are, namely graphs, as opposed to flat text files: > at the call site did the programmer reference that specific version of > the function definition? if someone modifies the definition then > should the call site call the old definition or the new one? if > someone renames the definition then should the call site refer to the > same definition or become a broken link? > > and a tangential to ponder about: for a compiler algorithm a program > means exactly the same even if we throw away all the names after name > resolution phase. > > mainstream computing systems in general have no clear abstraction for > first class identity management, and due to that references are also > murky. e.g. if i look up a movie on imdb.com, and when i drop it on my > desktop, then i want my computing system to display the identity of > that movie, or in short: the movie. not a file, not a specific video > stream representing that movie, not a URL to imdb.com, not the name of > the movie... but its identity, the movie itself. and the same applies > when i drag and drop that icon again into a chat message. > > so, in short: express your intention with high precision in the > references and in the data structures in general, and then the > solution will be trivial (which doesn't mean that properly identifying > your intentions is easy). > > -- > • attila lendvai > • PGP: 963F 5D5F 45C7 DFCD 0A39 > -- > “Merely having an open mind is nothing; the object of opening the > mind, as of opening the mouth, is to shut it again on something > solid.” > — G.K. Chesterton > _______________________________________________ > fonc mailing list > [email protected] > http://vpri.org/mailman/listinfo/fonc > -- Fernando Cacciola SciSoft Consulting, Founder http://www.scisoft-consulting.com
_______________________________________________ fonc mailing list [email protected] http://vpri.org/mailman/listinfo/fonc
