What should be added to C
Donald L. Nash
dlnash at ut-ngp.UUCP
Wed May 21 03:44:23 AEST 1986
In article <1462 at mmintl.UUCP>, franka at mmintl.UUCP (Frank Adams) writes:
>
> o := as a synonym for =. Compilers could have an option to permit := only.
>
Why? "Since assignment is about twice as frequent as equality testing
in typical C programs, it's appropriate that the operator be half as long."
K&R, p. 17. Allowing := as a synonym is OK, if you prefer that operator,
but why would you want to make it manditory?
>
> o Any sort of multi-level break statement. There is no syntacticly clean
> way of adding this to C.
>
How about using goto? Some people may think that goto sucks wind, but it
is a perfectly legitimate statement which can get you out of trouble, if
properly used.
> I do not support the following:
>
> o ^^ for logical exclusive or. Unlike the other "short-circuit" forms (&&
> and ||), this doesn't save any execution -- both operands must be evaluated.
So what if they both have to be evaluated? If you need to use some
kludge to get ^^ (like !a != !b), you will still wind up evaluating both
operands. That's just the way XOR works. Just because it requires more
work is no reason to exclude it from the language.
>
> Frank Adams ihnp4!philabs!pwa-b!mmintl!franka
> Multimate International 52 Oakland Ave North E. Hartford, CT 06108
I don't want to come off sounding like a fluff picker, so just for the
benefit of those of you who care, I did agree with the rest of the
article. If net traffic weren't such a big issue, I'd have included the
rest of the article as well, with more agreeable comments added.
Don Nash
UUCP: ...!{ihnp4,allegra,seismo!ut-sally}!ut-ngp!dlnash
APRA: dlnash at ngp.CC.UTEXAS.EDU
BITNET: cceu001 at utadnx
"If you can't say something nice, then don't" -- Thumper the rabbit
More information about the Comp.lang.c
mailing list