PRECEDENT FOR USE OF =

Tainter tainter at ihlpg.UUCP
Wed Jul 9 03:52:20 AEST 1986


> In article <1645 at brl-smoke.ARPA> JUNG_E%SITVXA.BITNET at WISCVM.WISC.EDU writes:
> >Why can't C be like everybody else?  Practically every language uses
> >the equals sign, "=", to test for equality, not as an assignment operator.
> >...
> >              Kernighan and Ritchie, in their infinite wisdom, decide
> >instead to use "=" for assignments and to create a new operator, "==" to
> >test for equality.
> Not only that, they changed "begin" and "end" to { and }, changed "writeln"
> to puts, and all sorts of awful things!  They made it into a WHOLE NEW
> LANGUAGE!!!!!
And ignored rationality for a cutesy orthoganal operator construct which they
screwed up anyway.

<< should be less than, >> greater than, == equal, >= greater or equal,
<= less or equal, <>  (or >< ) greater than or less than

The problems C has are mostly in human readability.  Of which, the most glaring
is the use of = as assignment and == as comparison.

NOTE: I don't recall Algol having a writeln so I don't why you say they
    changed it to puts. :-)

    Yes, I know he was claiming comparison to Pascal as reason for objection
    to C.  Pascal has a writeln but it is much more like printf than prints.

--j.a.tainter



More information about the Comp.lang.c mailing list