Newsgroups: comp.lang.c
Path: utzoo!henry
From: henry@utzoo.uucp (Henry Spencer)
Subject: Re: ambiguous ?
Message-ID: <1989Oct27.174338.7539@utzoo.uucp>
Organization: U of Toronto Zoology
References: <1989Oct20.175352.20598@utzoo.uucp> <14102@lanl.gov> <1989Oct21.071319.8839@utzoo.uucp> <2816@trantor.harris-atd.com>
Date: Fri, 27 Oct 89 17:43:38 GMT

In article <2816@trantor.harris-atd.com> bbadger@x102c.harris-atd.com (Badger BA 64810) writes:
>>... I have no objection
>>to operators whose specific purpose is to force order, when they are
>>broadly useful.  I do have considerable objection to code that depends
>>on evaluation order *without* putting the reader on notice of it by
>>explicitly using forcing operators.
>
>I'm not sure if you're saying that a known order of evaluation (OOE) is a 
>*bad* idea, or that you would rather accept an undefined order so that 
>all possible compiler optimizations which may depend on the OOE would be 
>legalized.

To clarify:  my view is that order-dependent code in C is almost always
a bad idea, and should be avoided like the plague, barring one or two
specialized constructs like && whose mission in life is order control.
If one is sensible and avoids order-dependent code, there is no reason
to forbid compiler reordering, and it does give more opportunity for
optimization.
-- 
A bit of tolerance is worth a  |     Henry Spencer at U of Toronto Zoology
megabyte of flaming.           | uunet!attcan!utzoo!henry henry@zoo.toronto.edu
