unary +

HARGED%ti-eg.csnet at CSNET-RELAY.ARPA HARGED%ti-eg.csnet at CSNET-RELAY.ARPA
Thu Apr 3 09:13:03 AEST 1986


> As has been mentioned already, the unary + operator acts a a signal to any
> optimizer to not migrate things from below the node to above it and
> visa-versa.

Why do you want to embed a compiler directive in the middle of an expression?
Particularly when it looks like it has some arithmetic meaning (even though
it doesn't).

Folks, no two ways about it: "a + +(b + c)" looks very strange (it looks like 
a typographical error), particularly when it is *required* to accomplish what 
most people intuitively assume "a + (b + c)" will accomplish. From a human
factors standpoint, this proposal is a disaster. If adopted, it will become a
textbook example of an anti-intuitive language construct. While it is important
that compilers generate maximally optimized machine code, it is more important
that humans be able to read and understand the source code. This one has the
potential to introduce some truly subtle bugs ("Oh ! There's supposed to be a
space between the two plus-signs !"), as well as sow confusion among user's who
are not intimately familiar with code generation.

Richard Hargrove
Texas Instruments
harged%ti-eg at csnet-relay



More information about the Comp.lang.c mailing list