Path: utzoo!utgpu!water!watmath!clyde!rutgers!cmcl2!brl-adm!adm!TLIMONCE%DREW.BITNET@CUNYVM.CUNY.EDU From: TLIMONCE%DREW.BITNET@CUNYVM.CUNY.EDU Newsgroups: comp.lang.c Subject: Re: unofficial December notes Message-ID: <10917@brl-adm.ARPA> Date: 19 Dec 87 02:55:57 GMT Sender: news@brl-adm.ARPA Lines: 44 First of all, I'm all for noalias. It helps generate faster code for those who know how to use it. It's like register; if you don't know how to use it... DON'T USE IT. Why all the debate? It simply is a warning to the compiler that there are never going to be pointers to that object that will change the value "behind the compilers back". (actually, it says that there's no pointers that will not change it either) 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. This isn't encouraging programmers to use side effects but it isn't helping either. What happened to setting up a method of stateing "don't re-group me". I know a #pragma was suggested but a lot of people don't like pragmas. What happened to the suggestion about a unary plus? I see no problem with +( a()+b() ) + c() as a very clean method. (I also think my macros may be nicer if I had a unary plus). What really makes me not like this idea is the fact that I see a lot of room for optimization when I realize that a[i] is *(a+i). One of the reasons that "typical C" is faster than "typical pascal" (Ummm... note I say "typical"... I'm making a generalization here. No flames please) is that pascal people loop i from a to b and process c[i]. That's a lot of (c+i)'s going on. In C generally you do i=&a and loop to &b. When I do complex array processing (a lot of my string work) I will now wonder what the optimizer is NOT doing. Someone stated (sorry, I forgot your name) that ANSI has given us a new road to better code and removed anther. I agree. I think that removing this feature of C is the ONLY thing that ANSI has done that I don't like so far. This is certainly a pretty good hit ratio. Congradulations. Tom Limoncelli BITNET: tlimonce@drew LIFE: Drew U/Box 1060/Madison NJ/07940 Disclaimer: Don't believe me. It only encourages me to write more. --------------------------------------------------------------------