Path: utzoo!attcan!uunet!mcvax!ukc!dcl-cs!nott-cs!anw From: anw@nott-cs.UUCP Newsgroups: comp.lang.misc Subject: Re: Expression Based Language Message-ID: <605@tuck.nott-cs.UUCP> Date: 9 Jan 89 15:56:15 GMT References: <3300001@uxg.cso.uiuc.edu> <3290002@hpctdls.HP.COM> <4505@xenna.Encore.COM> <2583@ficc.uu.net> <9310@ihlpb.ATT.COM> <11359@hadd Reply-To: anw@maths.nott.ac.uk (Dr A. N. Walker) Organization: Department of Mathematics, The University, NOTTINGHAM, NG7 2RD, UK. Lines: 23 In article <11359@haddock.ima.isc.com> karl@haddock.ima.isc.com (Karl Heuer) writes: [a thoughtful and interesting article about how to extend C into a full expression language.] >[...]. On the other hand, a language with expression/statement equivalence >probably shouldn't be based on C in the first place, since several constructs >become redundant (braces vs parens, semicolon vs the comma operator, if-then >vs the ternary operator). On the third hand [:-),*], this redundancy can be very helpful to humans. Eg, if parens/braces/brackets were everywhere interchangeable, then a measure of "elegant variation" makes multi-bracketed expressions more readable and may help the compiler to produce better error messages (by localising bracket mis-matches). Similarly, having both "if-then" and "?:" gives the human some syntactic sugar with which to clarify meaning. ------- * On a clock, the third hand is presumably the second hand. -- Andy Walker, Maths Dept., Nott'm Univ., UK. anw@maths.nott.ac.uk