smart compilers

Dick Dunn rcd at opus.UUCP
Fri Dec 14 15:37:06 AEST 1984


> 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?



More information about the Comp.unix.wizards mailing list