Unnecessary Macros (was Re: Unnecessary Parenthesis)

Rob Carriere rob at kaa.eng.ohio-state.edu
Tue Oct 4 04:30:54 AEST 1988


In article <8590 at smoke.ARPA> gwyn at brl.arpa (Doug Gwyn (VLD/VMB) <gwyn>) writes:
>One wonders whether [the inability to define a square macro] is much of a
>problem.

How about the following, deep in some inner loop:

foo = square( sin( x )) + 1.7;

I *don't* want to write:

foo = sin( x )*sin( x ) + 1.7;

and

temp = sin( x );
foo = temp*temp + 1.7;

is clearly less legible.

Rob Carriere



More information about the Comp.lang.c mailing list