Precedent for use of =

Charley Wingate mangoe at umcp-cs.UUCP
Mon Jun 30 13:59:45 AEST 1986


Actually, the only real problem in confusing equality with assignment is
when people try to put assignments in expressions to get side effects, at
least in procedural languages.  PL/I solves the problem neatly (when's the
last time you heard THAT about PL/I?) by having a special
assignment-in-an-expression operator.

The only language that actually followed the mathematics convention was
BASIC as it existed before micros, when the magic word LET was generally
required.  What we really need is a one-character assignment operator; only
APL has the optimal solution as it stands.  The C convention is unfortunate
for two reasons; first, it's unlike everyone else's, and second, confusing
the operators is not likely to result in a syntax error.
(Chris, I can't imagine why you mentioned Snobol.  In my view, saying that
snobol does something in such and such a way is tantemount to saying that we
should find another way to do it.)

C. Wingate



More information about the Comp.lang.c mailing list