Precedent for use of =

guy at sun.UUCP guy at sun.UUCP
Fri Jun 20 04:55:13 AEST 1986


> Is it really worth using a notation that is contrary to that of the more
> universal mathematics, and thus guaranteed to confuse novices and catch pros
> off-guard in order to type "=" instead of ":="?  I think adding a few
> characters to improve readability and understandability is worth the
> time and effort.

Is it really worth changing a well-established language syntax, in such a
way that would break the hell out of existing programs, in order to conform
with what is admittedly the dominant notation?  I think leaving C alone to
keep from breaking existing programs and programmers is worth the confusion
it may cause to some people.

> Consequently, I wrote a pre-processor for C called ac68 that uses := for
> assignment, = for equality, and has all the cumulative operators in the
> style of Algol 68: +:=, -:=, *:=, &:=, <<:=, etc.  Unfortunately, the C
> and dbx messages refer to the operators that get generated.  Still, the
> code is a lot more readable.

Unless you advertise the language accepted by this preprocessor as a
language which is similar to C, but is NOT C, I sincerely doubt that.  I
find that the fake ALGOL 68 crap that Steve Bourne used to write the Bourne
shell and "adb" to make the code a lot *less* readable.  Let C be C!
-- 
	Guy Harris
	{ihnp4, decvax, seismo, decwrl, ...}!sun!guy
	guy at sun.com (or guy at sun.arpa)



More information about the Comp.lang.c mailing list