Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!ukc!dcl-cs!aber-cs!athene!pcg From: pcg@cs.aber.ac.uk (Piercarlo Grandi) Newsgroups: comp.lang.misc Subject: Re: C's sins of commission Message-ID: Date: 30 Oct 90 20:11:01 GMT References: <2062@aber-cs.UUCP> <1990Oct26.155937.29185@maths.nott.ac.uk> Sender: pcg@aber-cs.UUCP Organization: Coleg Prifysgol Cymru Lines: 52 Nntp-Posting-Host: teachk In-reply-to: anw@maths.nott.ac.uk's message of 26 Oct 90 15:59:37 GMT On 26 Oct 90 15:59:37 GMT, anw@maths.nott.ac.uk (Dr A. N. Walker) said: anw> How do I express the identity of one node with another [ie, perhaps anw> the same node, but reached via some chain of edges]? How do I anw> *draw* it? pcg> This is a thing on which I have already commented, but I love pcg> repeating myself. The correct way to implement identity is by pcg> contents, not location. anw> But why should I have to invent a contents, just so that I can anw> avoid referring to location? You are not inventing a content -- what you call "location" here is part of the contents, it is the relationship between a content and another. It is also a content, at some higher level of abstraction. anw> If I draw a graph with lots of nodes, and put some information anw> (perhaps a colour, RED, GREEN, BLUE, ...) in each, I don't anw> necessarily want the contents to be unique. By definition, if two entities have the same contents they are the same entity, unless they are elementary particles and Bell's Theorem applies :-). What actually happens is that then you put only part of the contents in the actual data storage. anw> On the other hand, if I'm explaining my drawing to you, I can point anw> to nodes: "Look, *this* node connects to *that*, and so there's a anw> path from *here* to *there*". There's nothing wrong with location! Then part of the contents is in the location. This is just an implementation technique, not a concept; and it is an implementation technique that complicates matters. When I design an entity I want to be able to know whether it is the same or different from another entity. I want the entity to contain all information that distinguishes it from any other. If I do not encode information in the location I can just look at the the entities and compare them; if I encode part of the information in the location I also have to compare their locations. This adds a whole new world of complication, because we need no longer just an algebra for objects, but also an algebra for locations, and we must prove that a program not only works ok wrt to contents, but also to locations, and that the encoding of parts of the contents in the location is preserved correctly. This is worth the while if we are working close to the machine, because that is how the machine is built. It is crazy if we are using an high level language, like SQL or APL or whatever else like it. -- Piercarlo "Peter" Grandi | ARPA: pcg%uk.ac.aber.cs@nsfnet-relay.ac.uk Dept of CS, UCW Aberystwyth | UUCP: ...!mcsun!ukc!aber-cs!pcg Penglais, Aberystwyth SY23 3BZ, UK | INET: pcg@cs.aber.ac.uk