Path: utzoo!utgpu!water!watmath!codas!karthur From: karthur@codas.att.com (Kurt_R_Arthur) Newsgroups: comp.lang.c Subject: Re: == vs = Message-ID: <1530@codas.att.com> Date: 12 Jan 88 14:20:02 GMT References: <11220@brl-adm.ARPA> Organization: AT&T, Altamonte Springs, FL Lines: 36 In article <11220@brl-adm.ARPA> V4039%TEMPLEVM.BITNET@CUNYVM.CUNY.EDU (Stan Horwitz) writes: > > Yep, I completely agree with Mr. Lauff who offers some legitimate > rationale for having another symbol in place of "==". It is not at all > unusual for symbols such as "=" to be misprinted or just smudged on high > speed line printers. Why compound errors by having two such similar > operators? I suggest the symbol => in place of ==. It's such a nice, > unassuming symbol. It's inclusion would not cause many problems even > for those compiling older programs. As was said, all that is needed to > convert older programs' use of == to => is a global replace command in > your editor. If your program is extremely large, then take a few minutes > to get a soda while your editor is making the change. We all need an > occassional coffee (or soda) break. The use of "=>" is troublesome to me for two reasons: 1. It is very similar to the >= operator (not a big deal). 2. It implies assignment from left to right. By this, I mean "a => b" TO ME looks like assign the value of 'a' to 'b'. A better operator (I think) is "<-". It still is similar to other operators (namely "->" & "<="), but it does imply right to left assignment. As far as I'm concerned, the Pascal-type ":=" is not a good choice due to the placement of the ":" and "=" on the keyboard. The actions required to make the combination are awkward for most touch typists. At this late date, though, I'm not sure C will ever change its assignment operator: too much code has been written. This kind of change will almost require a new language. Kurt Arthur Software Services of Florida, Inc.