Q:

Order of evaluation for most of the binary operators is left undefined to give the compiler opportunities for optimization

0

Order of evaluation for most of the binary operators is left undefined to give the compiler opportunities for optimization. This strategy presents a trade-off between efficient code generation and potential pitfalls in the use of the language by the programmer. Do you consider that an acceptable trade-off? Why or why not?

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

I think that is an acceptable trade-off. When an expression refers to and change the same object, we can always seperate that expression into several expressions to avoid the situation except where:

  - The operator involved is one of _and `&&`, or `||`, conditional `?:`, comma `,`_ operator,

  - The subexpression that change the operand is itself the operand of another subexpression.

 

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now