Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2.fluke 9/24/84; site vax2.fluke.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxt!houxm!vax135!cornell!uw-beaver!fluke!kurt From: kurt@fluke.UUCP (Kurt Guntheroth) Newsgroups: net.lang Subject: Re: Varieties of conditional statement Message-ID: <964@vax2.fluke.UUCP> Date: Thu, 10-Oct-85 11:09:54 EDT Article-I.D.: vax2.964 Posted: Thu Oct 10 11:09:54 1985 Date-Received: Sat, 12-Oct-85 18:07:41 EDT References: <418@phri.UUCP> <2600012@ccvaxa> <1901@reed.UUCP> <1703@peora.UUCP> Organization: John Fluke Mfg. Co., Inc., Everett, WA Lines: 30 Mr. Roskos uses his own measure of what makes a language 'weaker' to validate his basically religious argument that languages should be built with pascal/c style conditional statements rather than ada 'comb' style statements. There are other arguments. For instance, the Pascal style if statement is well known to result in ambiguities in the construction of reasonable parsers. (I believe there is a grossly complex mechanism that can be applied to disambiguate the if statement; see SIMULA BEGIN by Birtwistle et. al.) One could argue on this basis that such languages are syntactically weak, and thus that Ada style conditional constructs are superior. Mr. Roskos also argues that having only one kind of block containing local declarations is a property only of pascal style conditionals. This is not true, as it depends on the way block is defined in a language. I also note that the two blocks in an if-then-else statement will necessarily be distinct under either style, so there is no clear superiority in this area either. I can't resist giving my own opinion here: I like the Ada style 'comb' structured statements. The syntax is clean, and furthermore they result in a more obvious cannonical indentation, making everybody's programs more similar. You can also define the list of statements enclosed in the parts of a conditional or loop statement to be a block if the rest of your syntax allows you to tell the difference between a declaration and a statement. -- Kurt Guntheroth John Fluke Mfg. Co., Inc. {uw-beaver,decvax!microsof,ucbvax!lbl-csam,allegra,ssc-vax}!fluke!kurt