Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!caip!brl-adm!brl-smoke!terry From: terry@brl-smoke.ARPA (Terry Sejnowski ) Newsgroups: net.lang.c Subject: Re: PRECEDENT FOR USE OF = Message-ID: <1856@brl-smoke.ARPA> Date: Tue, 1-Jul-86 04:08:33 EDT Article-I.D.: brl-smok.1856 Posted: Tue Jul 1 04:08:33 1986 Date-Received: Wed, 2-Jul-86 05:16:48 EDT References: <1645@brl-smoke.ARPA> Reply-To: bogstad@hopkins-eecs-bravo.arpa Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 53 Keywords: C, Pascal, =, :=, == Summary: Ancestory of C & Pascal In article <1645@brl-smoke.ARPA> JUNG_E%SITVXA.BITNET@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. Gee, that must have required brains, the brains of >a 3 year old. > >If they had my brains, they would have used Pascal's method. Better yet, >they should have let someone else write up C. When I first read the above I was ready to flame away, but I decided to check my facts and come back to it later. Well now I'm ready. :-) The poster of the message above implies that K&R didn't have the faintest idea what they were doing and didn't bother to examine other languages (specifically Pascal) before going on their merry way. Well this sounded sort of fishy to me and I checked out the dates. Ancestory of C Ancestory of Pascal -------------- ------------------- Algol 60 - 1960 (Inter. Comm.) Algol 60 - 1960 (Inter. Comm.) CPL - 1963 (Cambridge and UL) Pascal - draft written - 1968 (Wirth) BCPL - 1967 (Martin Richards) Pascal - first compiler - 1970 B - 1970 (Ken Thompson) Pascal - first publication - 1971 C - 1972 (Dennis Ritchie) Pascal - revised report - 1973 Seems to me that it would be kind of hard to justify using Pascal as the basis for further work when at best it had been in use for a year or two. My impression is that around that time a lot of languages were being written and picking the winners would have taken a crystal ball. As to the symbols used to denote assignment and test for equality, I couldn't find any information on B, but the book on BCPL used := for assignment and = to test for equality. It also used = to set the value of a named constant. It took me a minute to realize what was going on there so I can see re-examining the issue when designing a new language. Quick Jab: If Pascal is so good why did its author (N. Wirth) write two other languages (Modula & Modula II) before deciding he had one which could be used for system implementation? (Lilith (sp?)) Bill Bogstad bogstad@hopkins-eecs-bravo.arpa Disclaimer: The above is true to the best of my knowledge. Corrections cheerfully accepted. Flames to /dev/null.