Precedent for use of =

Chris Torek chris at umcp-cs.UUCP
Sat Jun 21 17:10:24 AEST 1986


In article <115 at mruxe.UUCP> cgw at mruxe.UUCP (C Waldman) writes:
[Mathematical use of the symbol `=' includes three meanings:
test for equality, assignment of equality, and assertion of
equality.]
>[When programming] we are interested in telling the computer
>to DO something: therefore we are interested in [the first two]
>meanings....  We need two symbols to avoid ambiguity.

Fine so far; I think everyone agrees on this (with the exception
mentioned in some of the unquoted text of theorem-proving languages).

>... If anything, maybe I would agree with a different symbol for
>[the first] meaning..., like ?= or =? or something, but it's not
>worth making a change. If it ain't broke, don't fix it.

Here is where you will, with some, `run into a brick wall' (as they
never did say in Bree).  Some will claim that it *is* broken,
because people do at times write

	if (var = expr) ...

when they in fact meant

	if (var == expr) ...

As for myself, I believe that anyone can do bad things in any
language (includin' English like I's a-doin' right here now right
before your very own eyes doncha know :-) ), and that the proper
measure of a language is not how difficult it makes writing bad
code, but rather how easy it makes writing good code.
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 1516)
UUCP:	seismo!umcp-cs!chris
CSNet:	chris at umcp-cs		ARPA:	chris at mimsy.umd.edu



More information about the Comp.lang.c mailing list