Path: utzoo!attcan!uunet!samsung!uakari.primate.wisc.edu!uflorida!novavax!twwells!bill From: bill@twwells.com (T. William Wells) Newsgroups: comp.lang.c Subject: Re: A question of style Message-ID: <1989Dec4.032918.16550@twwells.com> Date: 4 Dec 89 03:29:18 GMT References: <547@mars.Morgan.COM> <1989Nov30.001947.14883@aqdata.uucp> <427@jhereg.Minnetech.MN.ORG> <565@s5.Morgan.COM> Organization: None, Ft. Lauderdale, FL Lines: 63 In article <565@s5.Morgan.COM> amull@Morgan.COM (Andrew P. Mullhaupt) [presents his subjective judgements as relevant to the discussion.] Sorry buddy, but your judgements are not mine. Moreoever, while some of your conclusions are valid, basing them on subjective judgements makes them appear less valid. For example, "There are no good excuses for the comma operator because it masquerades as true concurrent assignment where it is a poor relation of it." Maybe you think that the comma operator looks like concurrent assignment. If so, you need to work harder at disentangling your previous experience from your C programming. Many, perhaps most, C programmers don't ever think of concurrent assignment when seeing the comma operator. Certainly experienced C programmers don't. You then go on to say: "The thing invites you to cram all sort of gooey side effects into for loops with increment and assignment operators." Which is true, yet since you present it as related to that subjective statement, you *weaken* the force of the statement. Then you say (after a gratuitous and false ad hominem): : Now with real concurrent assignment, you : really can put your loop invariant maintenance in one place: : : (i++ , j--) : : can be replaced by the much more attractive: : : (i, j) := (i + 1, j - 1) Yet again we have a very subjective judgement, one which I very much disagree with. In fact, I'd say that the latter is defective on more than one level. Besides the extraneous characters needed to express a much simpler idea, you have interleaved two distinct ideas, incrementing `i' and decrementing 'j'; this sort of thing leads to decreased understanding. On the other hand, you describe the swap operation, written as: : (x, y) := (y, x) which is, indeed, a good use of the idea of concurrent assignment. There is one operation being expressed, so there is no burden on the reader to disentangle several ideas from the single piece of code. The primary error that the comma operator leads to, when used in the for statement, is the including of things which are not part of the control structure itself, moving the controlled statements into the for, and thus presenting the reader with several ideas crammed into the one statement. --- Bill { uunet | novavax | ankh | sunvice } !twwells!bill bill@twwells.com