What should be added to C

Rob McMahon cudcv at daisy.warwick.UUCP
Mon Jun 2 00:23:35 AEST 1986


In article <450 at cad.BERKELEY.EDU> faustus at cad.UUCP writes:
>In article <1497 at mmintl.UUCP>, franka at 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 at uk.ac.warwick.daisy
ARPA:   cudcv at daisy.warwick.ac.uk
PHONE:  +44 204 523037
Rob McMahon, Computer Unit, Warwick University, Coventry CV4 7AL, England



More information about the Comp.lang.c mailing list