Path: utzoo!utgpu!water!watmath!rbutterworth From: rbutterworth@watmath.waterloo.edu (Ray Butterworth) Newsgroups: comp.lang.c Subject: Re: unofficial December notes Message-ID: <16008@watmath.waterloo.edu> Date: 21 Dec 87 17:11:08 GMT References: <10917@brl-adm.ARPA> Organization: U of Waterloo, Ontario Lines: 23 In article <10917@brl-adm.ARPA>, TLIMONCE%DREW.BITNET@CUNYVM.CUNY.EDU writes: > Second of all, I *HATE* the decision about parenthesis. K&R says > that if the compiler can generate better code by re-writing > "(A+B)+C" to become "(A+C)+B" and now ANSI is saying no. I guess > if functions a(), b() and c() have side effects ( a()+b() ) + c() > shouldn't be allowed to be re-grouped but why penilize the > programmers who don't use side effects. In ( a() + b() ) + c() the parentheses now say that the first addition must be performed before the second. It does not say (I least I hope it doesn't) that a() and b() must be evaluated before c(). Compilers should still be free to make the function calls in any of the 6 possible orders, so long as the RESULTS of a() and b() are ADDED, but not necessarily EVALUATED, first. > but why penilize the programmers who don't use side effects. ^^^^^^^^ Does this imply that programmers who don't use side effects are lacking part of their anatomy, and that ANSI is going to repair this deficiency? Is that why some of them are known as "unix programmers"?