Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!linus!philabs!cmcl2!seismo!mcvax!ukc!warwick!cudcv From: cudcv@daisy.warwick.UUCP (Rob McMahon) Newsgroups: net.lang.c Subject: Re: What should be added to C Message-ID: <149@daisy.warwick.UUCP> Date: Sun, 1-Jun-86 10:23:35 EDT Article-I.D.: daisy.149 Posted: Sun Jun 1 10:23:35 1986 Date-Received: Tue, 3-Jun-86 23:44:54 EDT References: <1462@mmintl.UUCP> <5498@alice.uUCp> <1497@mmintl.UUCP> <450@cad.BERKELEY.EDU> Reply-To: cudcv@daisy.warwick.ac.uk (Rob McMahon) Organization: Computer Unit, Warwick University, UK Lines: 22 In article <450@cad.BERKELEY.EDU> faustus@cad.UUCP writes: >In article <1497@mmintl.UUCP>, franka@mmintl.UUCP writes: > > > Confusing "=" and "==" in if statements is a common mistake. If "=" is not > > a legal operator, this error becomes very rare. > >It's also an extra character to type... > Are you suggesting we all use single character variable names, or maybe {letter}{digit} when we need more than 26 ? I think phasing in ":=" over a number of years is an excellent idea, first providing a switch to turn on warnings about "=", then always warning, then maybe giving errors. The trouble is "if (a = f())" is just too useful, if you could write "if (a := f())" it becomes readable too (".. a becomes equal to ..." instead of "... a equals ..."). -- UUCP: ...!mcvax!ukc!warwick!cudcv JANET: cudcv@uk.ac.warwick.daisy ARPA: cudcv@daisy.warwick.ac.uk PHONE: +44 204 523037 Rob McMahon, Computer Unit, Warwick University, Coventry CV4 7AL, England