short circuit evaluation (44 li
mccaugh at uiucdcsm.UUCP
mccaugh at uiucdcsm.UUCP
Sat Feb 21 15:41:00 AEST 1987
This is not submitted as a criticism to the foregoing erudite discussion of
side-effects, but is rather an innocent question about C in particular: why
does C refuse to abide by the associativity/precedence rules for expression-
evaluation that even BASIC guarantees? I can well understand "optimization"
as an excuse but can easily imagine cases where normally-evaluated expressions
can crash a system when "optimized" for eavaluation without the programmer's
express consent. Isn't it a little arbitrary for C to mnaipulate the parts
of an expression to its satisfaction (or whim)? In particular, this renders
the formal verification of C-code impractical.
More information about the Comp.lang.c
mailing list