Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!nbires!rcd From: rcd@nbires.UUCP (Dick Dunn) Newsgroups: net.lang Subject: Re: compound statements (zero, pos. notation) Message-ID: <477@opus.nbires.UUCP> Date: Wed, 23-Jul-86 23:31:34 EDT Article-I.D.: opus.477 Posted: Wed Jul 23 23:31:34 1986 Date-Received: Thu, 24-Jul-86 08:17:40 EDT References: <221@bsdpkh.UUCP> <800018@ccvaxa> Organization: NBI,Inc, Boulder CO Lines: 58 Summary: skip is NOT 0, much ado about nothing > >> Dijkstra argues that making the null statement explicit, `skip', with > >> defined semantics, may be as important for computer science as the > >> invention of zero was for arithmetic. > > > >Mmph. That's either a misattribution or one of the craziest analogies I'VE > >ever heard. OK, thanks to Andy Glew, I can correct that last statement: >Reference: _A_Discipline_Of_Programming_, Edsger W. Dijkstra, Prentice-Hall... > p. 25: The semantics of the statement named `skip' are therefore given by > wp(skip,R) = R > ... > Note: Those who think it a waste of characters to introduce an explicit > name such as `skip' for the empty statement while "nothing" expresses its > semantics so eloquently, should realize that the decimal number system > was only possible thanks to the introduction of the character "0" for > the concept zero. (End of note.) So he (EWD) didn't really SAY that `skip' might be as zero, but he certainly encourages such an interpretation. I guess I'll go with calling it one of the craziest analogies I've ever heard. > The semantics should be intuitively obvious (`wp' means weakest precondition, > so wp(skip,R)=R means that for R to be true after a skip it must have been > true before (unless you're time based)). Are they uninteresting because they > are obvious? Maybe so: do you find zero uninteresting? Maybe you do (I > don't), but even so, is interest a prerequisite for a notation? The fact that wp(skip,R)=R is true; it may be of notational interest; in a formal system you may have to have just such a statement. But stripped of the notation, it says "if something is true and absolutely nothing happens, that something is still true." This is not only obvious to the meanest of intelligences; it is a tautology. The question "do you find zero uninteresting?" has nothing (!) to do with the matter of the empty statement. Somehow zero the digit and zero the value (which happens to be denoted by an occurrence of zero the digit) have gotten horribly confused here. [If you want to play some little games, you can construct a notation in which a zero value is denoted by the absence of any symbols, yet 0 is still used as a placeholder in positional notation! To arrive at such a notation, just take what we normally use and ALWAYS remove ALL leading 0 digits from values.] > The point is, programming is a positional notation. S1;S2 is not the same > as S2;S1, hence it is position sensitive, and in any position sensitive > system you need a placeholder. The analogy here seems to be made with positional number systems. It is true that 10 is not the same as 01. But the analogy just doesn't work--if it did, S1;skip would not be the same as skip;S1! The form S1;S2 is a spatial representation of a temporal concept. Positional number notation is atemporal. Finally...just because Dijkstra said it, it ain't necessarily so. He's good but not infallible, and he often uses hyperbole to make a point. -- Dick Dunn {hao,ucbvax,allegra}!nbires!rcd (303)444-5710 x3086 ...Never attribute to malice what can be adequately explained by stupidity.