Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!uakari.primate.wisc.edu!brutus.cs.uiuc.edu!psuvax1!rutgers!cmcl2!lanl!jlg From: jlg@lanl.gov (Jim Giles) Newsgroups: comp.lang.c Subject: Re: ambiguous ? Message-ID: <14102@lanl.gov> Date: 20 Oct 89 23:02:09 GMT References: <1989Oct20.175352.20598@utzoo.uucp> Organization: Los Alamos National Laboratory Lines: 22 From article <1989Oct20.175352.20598@utzoo.uucp>, by henry@utzoo.uucp (Henry Spencer): > [...]Personally, my view is that code which relies on order of evaluation > within expressions -- except in a few well-defined cases like C's && and > || operators -- is broken even if the language specifies a precise meaning. Gee, isn't it interesting that the only order dependent behaviour you are willing to trust are the "well-defined" && and || operators. Those also happen to be the only ones (besides commas - which you presumably also allow) that enforce order. This is another one of those "Anything C does is right, everything else is not" arguments. Presumably, if C made argument evaluation in function calls "well-defined", you would would have no qualms depending on their order either. Since that has been the point I've tried to make all along - I rest my case. > [...] The purpose of > a programming language is to make the algorithm executable. This always > involves compromises. If it involves compromises of correctness, the language is not worth pursuing. If it involves _unnecesasary_ compromises of efficiency, the language is in need of modification. C requires one or the other compromise.