Precedent for use of =
MEYER at RADC-TOPS20.ARPA
MEYER at RADC-TOPS20.ARPA
Fri Jul 4 11:15:55 AEST 1986
I know this is going to cause a bit more of a stir here, here goes.
Everybody keeps guessing at the reasons for the use of = for asignment
and == for equality tests. How about a different angle: how many times
in a program do you assign something versus how many times you compare things?
I seems to me that if it comes down to keystrokes (which by the way is why
a lot of UNIX commands are two or three letters long) I'll take = for
assignment any day. When I was writing PASCAL programs, Mmy most
common error was typing '=' when I meant ':='. Also, if you think about it,
the use of == is not so bad 'cuz it is the same character typed twice as
opposed to two keys in entirely different places on the keyboard in which
one of them has to be shifted and the other not. I prefer not to have to
perform keyboard acrobatics to type in a program.
Maybe Mssrs. Kernighan and/or Ritchie would like to give some input on
their reasons of choice.
-------
More information about the Comp.lang.c
mailing list