Path: utzoo!utgpu!watmath!att!tut.cis.ohio-state.edu!cs.utexas.edu!uunet!mcvax!sunic!enea!sommar From: sommar@enea.se (Erland Sommarskog) Newsgroups: comp.lang.eiffel Subject: a < b < c Message-ID: <182@enea.se> Date: 14 Aug 89 21:51:08 GMT Organization: Enea Data AB, Sweden Lines: 27 There is currently a discussion going on in comp.lang.misc under the subject "What I like to see in an if-statement", and the subject line I have chosen shows the desired feature. In short the rule for a relational expression should be something like: Rel_exp ::= Expression (Rel_op Expression)* where ()* means one or more occurences. The semantic interpretation would be than of a logical AND so that: a < b <= c > a + 2 would be a shorthand for a < b AND b <= c AND c > a + 2 When I took a compiler course ages ago, the little language I defined had this feature. And there are several occasions when this would relational expressions shorter and thus easier to read since what is omitted is superflouos syntactic noise. I mentioned this in an article, and one reponse agreed with me, and answered my question why so few language had it with the simple "Algol didn't have it". And it sounds likely. When you sit down and design a new language, things like boolean expressions is just something you "take off the shelf". Anyway, since Eiffel still is open for the changes for some more time, why not take the chance and add it? Not an essential thing, but one of those little things that makes life easier. Or is there some problem I have over-looked? -- Erland Sommarskog - ENEA Data, Stockholm - sommar@enea.se "Hey poor, you don't have to be Jesus!" - Front 242