Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!caip!seismo!umcp-cs!chris From: chris@umcp-cs.UUCP (Chris Torek) Newsgroups: net.lang.c Subject: Re: Precedent for use of = Message-ID: <2208@umcp-cs.UUCP> Date: Sun, 29-Jun-86 23:27:50 EDT Article-I.D.: umcp-cs.2208 Posted: Sun Jun 29 23:27:50 1986 Date-Received: Tue, 1-Jul-86 02:05:39 EDT References: <1645@brl-smoke.ARPA> Reply-To: chris@maryland.UUCP (Chris Torek) Organization: University of Maryland, Dept. of Computer Sci. Lines: 59 In article <1645@brl-smoke.ARPA> JUNG_E%SITVXA.BITNET@WISCVM.WISC.EDU writes: >Why can't C be like everybody else? It is too late for C to be like anything else; it is like C. Besides, if it were exactly like (say) Pascal, it would *be* Pascal. There is room for many languages. >Practically every language uses the equals sign, "=", to test for >equality, not as an assignment operator. Perhaps you know more languages than I. Let me list those whose syntax I remember, and count `= for assigment' vs. `= for equality' (or both). Assignment Equality ---------- -------- Algol APL awk BASIC (really both) FORTRAN Icon Lisp (neither really) Mesa Pascal Snobol Well, 5 to 3 in favour of `= for equality', though APL and Mesa are perhaps special cases: back-arrow is not available for assignment on my H19. >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. Both Brian Kernighan and Dennis Ritchie have quite a bit of experience designing and using languages. Rather than spewing insults, it might be more productive to do some studies as to whether the symbols used for assignment and testing affect programming speed and error rates, for both novice and experienced programmers. Perhaps they did what they did because of some particular insight that others have missed, or perhaps it was a mistake. As far as I can tell, you have not even attempted to determine this experimentally. >If they had my brains, they would have used Pascal's method. Better yet, >they should have let someone else write up C. >Edward Jung, Stevens Institute of Technology >JUNG_E@SITVXB.BITNET If C were different, it would be different. That tells us nothing. C as it is now is quite obviously rather popular. How many languages have you designed, and who is using them? -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 1516) UUCP: seismo!umcp-cs!chris CSNet: chris@umcp-cs ARPA: chris@mimsy.umd.edu