Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!gem.mps.ohio-state.edu!usc!merlin.usc.edu!nunki.usc.edu!jeenglis From: jeenglis@nunki.usc.edu (Joe English) Newsgroups: comp.lang.c Subject: Re: ambiguous ? Message-ID: <5863@merlin.usc.edu> Date: 20 Oct 89 01:03:34 GMT References: <1989Oct19.022327.6730@utzoo.uucp> <14092@lanl.gov> Sender: news@merlin.usc.edu Reply-To: jeenglis@nunki.usc.edu (Joe English) Organization: University of Southern California, Los Angeles, CA Lines: 38 jlg@lanl.gov (Jim Giles) writes: >The primary purpose of a programming language is to _unambiguously_ >specify the operation of an algorithm. The extent to which C violates >this is the extent to which C fails in the _purpose_ of a programming >language. This is a perfectly rational argument. I suspect you will >ignore it. That's not a perfectly rational argument: You *can* unambiguously specify the operation of any algorithm in C. The existence of legal expressions that are ambiguous doesn't take away from the unambiguous ones. The reason why C is one of the few languages that accepts ambiguous statements is because C is one of the few languages that allows more than one side effect inside an expression. I think that's a more than reasonable tradeoff as long as you know what you're doing. The utility of constructs like increment operators, treating assignment like any other expression, and so on, are well established. So they lead to ambiguities *if improperly used*. So what? [ Out of context quote follows: ] > [...]it's so hard to convince C fanatics that >there may be something wrong with their god (the C programming language >that is). All Hail the Mighty C, and its Prophets K&R! [ Sorry, I couldn't resist that one... ] --Joe English jeenglis@nunki.usc.edu.