jlg@lanl.gov (Jim Giles) (03/17/89)
From article <3452@ficc.uu.net>, by peter@ficc.uu.net (Peter da Silva): > In article <39273@oliveb.olivetti.com>, chase@Ozona.orc.olivetti.com (David Chase) writes: >> * :=/= instead of =/== > > But this definitely was. > I never liked ':=' for assignment. It has been claimed that it was selected because it _looked_like_ a left pointing arrow. It doesn't, of course, look anything like a left pointing arrow. If I'm to be forced to use two char- acters for the assignment operator (and one of them shifted no less) I would rather have '<-'. This, at least, really does look like a left arrow. Frankly, I prefer =/== to :=/=. ':=' was only chosen in the early days because some hardware didn't have '<' in the character set. > Take your pick: > > min2(a,b) { return (a < b) ? a : b; } > #define min2(a,b) (((a) < (b)) ? (a) : (b)) Obviously, I pick the first one since the second is not even correct! If either of the arguments to the macro have side-effects, the macro may return the wrong answer - and it will certainly perform at least one of the side-effects too many times.
kers@otter.hpl.hp.com (Chris Dollin) (03/20/89)
If anone else has seen my response (denigrating bracketed comments) twice, don't blame me! These seems to be a plague of duplicated postings recently. Regards, Kers.