Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.csd.uwm.edu!bionet!ig!arizona!gudeman From: gudeman@arizona.edu (David Gudeman) Newsgroups: comp.lang.misc Subject: Re: What I'd really like to see in an if-statement... Message-ID: <13368@megaron.arizona.edu> Date: 21 Aug 89 21:04:19 GMT Organization: U of Arizona CS Dept, Tucson Lines: 33 In article <126@castle.ed.ac.uk> db@lfcs.ed.ac.uk (Dave Berry) writes: >[in Icon]... >What about (a < b) = (d < e), i.e. comparing results of relational >operations? ... >and not to the expected result from boolean logic. Or does bracketing >a relational expression force it to produce a canonical truth value (ugh) ? No. Icon doesn't have anything resembling a boolean type. I might point out that the expression (a < b) = (d < e) is from _extremely_ obscure boolean logic, not from common high school algebra. No one would know what to do with it except digital engineers, mathematicians and Pascal programmers. Icon was written for a larger audience. And furthermore, #include Boolean algebra is an inelegant hack in programming languages. Programming languages should either restrict relations to conditional contexts (ick) or find an interesting and useful purpose for relationals outside of conditional contexts (like C, Lisp, and Icon have done). Actually, boolean algebra is an attempt at the second option, but a failed one. Why use a trivial domain like truth values when it can easily be subsumed into a larger, more interesting domain? -- David Gudeman Department of Computer Science The University of Arizona gudeman@arizona.edu Tucson, AZ 85721 {allegra,cmcl2,ihnp4,noao}!arizona!gudeman