Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/17/84; site opus.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!godot!harvard!seismo!hao!cires!nbires!opus!rcd From: rcd@opus.UUCP (Dick Dunn) Newsgroups: net.unix-wizards,net.lang Subject: Re: smart compilers Message-ID: <973@opus.UUCP> Date: Fri, 14-Dec-84 00:37:06 EST Article-I.D.: opus.973 Posted: Fri Dec 14 00:37:06 1984 Date-Received: Sun, 16-Dec-84 05:10:34 EST References: <783@enea.UUCP> <479@sftig.UUCP> Organization: NBI,Inc, Boulder CO Lines: 16 Xref: watmath net.unix-wizards:11066 net.lang:1137 > I don't understand why people would consider a compiler "smart" > if it were to replace the two nested empty 'for' loops with assignments > of the loop variables. I prefer a compiler to do the expected -- what > I told it to do. These kinds of 'optimizations' can make programming a pain > in the neck... I agree with this sentiment--but realize that it's as much wrapped up in language design as in compiler implementation. Languages such as C (and a VERY few others) allow you sufficient capability to say just what you want done that the attitude above makes sense. On the other side, consider a FORTRAN compiler for a vector machine. FORTRAN is so crippled in terms of being able to express what's "really going on" in its problem domain that a decent (let alone smart) compiler has to do a lot of optimization. -- Dick Dunn {hao,ucbvax,allegra}!nbires!rcd (303)444-5710 x3086 ...Are you making this up as you go along?