Path: utzoo!attcan!uunet!aplcen!uakari.primate.wisc.edu!brutus.cs.uiuc.edu!usc!cs.utexas.edu!tut.cis.ohio-state.edu!purdue!mentor.cc.purdue.edu!l.cc.purdue.edu!cik From: cik@l.cc.purdue.edu (Herman Rubin) Newsgroups: comp.lang.misc Subject: Re: Anyone want to design a language? Summary: Comprehensibility, communicability, and "how the operations are done" are different Message-ID: <1968@l.cc.purdue.edu> Date: 27 Feb 90 14:31:53 GMT References: <10979@saturn.ADS.COM> <1106@thor.wright.EDU> Organization: Purdue University Statistics Department Lines: 41 In article <1106@thor.wright.EDU>, econrad@thor.wright.edu (Eric Conrad) writes: > From article <10979@saturn.ADS.COM>, by xanthian@saturn.ADS.COM (Metafont Consultant Account): > > Better, make the language strictly postfix, give it exactly one > ^^^^^^^ > > Why not prefix notation? Prefix notation is more common than postfix > in mathematical literature, > f(x,y,z) rather than (x,y,z)f > I suspect that it is a easier to read for those of us used to reading > from left to right since it emphasizes the operators rather than the > operands. > > Of course I haven't used an HP calculator in a long time so I am > probably prejudiced. Mathematical notation is mostly a mixture of prefix and infix notation, with infix predominating in use. There are syntactic advantages to prefix and postfix (lack of parentheses), although additional separator characters may be needed. If we had started out with a strictly prefix (Polish notation) or a strictly suffix (reverse Polish), by all means we would design our computer languages accordingly. However, there are situations where infix notation is easier to understand. When it comes to carrying out a calculation which is not inlined, how is this done? The normal procedure is to create the argument list (this is done in various ways) and then to call the procedure. Thus, computation seems to be essentially postfix. This is even true with simpler situations on calculators, and for hand calculation. When an arithmetic operation is performed, the arguments are normally assembled before the operation is begun. This is why I find RP calculators easier to use, besides being less error prone (someone came into the office when I was making an entry; did I hit the + key or not?). The aim of the language is for the human, not the computer, to have the easy time. This means that the language should be able to communicate to the compiler what the human wants done, and this should not be restricted to what the compiler-writer thinks the human might want done. -- Herman Rubin, Dept. of Statistics, Purdue Univ., West Lafayette IN47907 Phone: (317)494-6054 hrubin@l.cc.purdue.edu (Internet, bitnet, UUCP)