M. Edward (Ed) Borasky wrote: >> I don't much like combining postfix notation with right-to-left >> evaluation. I tend to think that the notation should "precede" the >> operands in the direction in which operations are evaluated. Of course, >> that's more a matter of familiarity and comfort for me than any kind of >> objective criteria (other than consistency with traditional function >> notation), but it's how I feel. >> >> In other words, if the operator notation is going to be placed to the >> right of the operands, I'd prefer operands be evaluated right-to-left. >> >> Of course, I don't think *anyone* would like the way that would look, so >> that pretty much breaks down to preferring prefix notation over postfix >> notation. >> > > A little history: > > 1. Polish notation was originally prefix. It was invented by the > Polish logician Lukaciewicz because it removed parentheses, and was > called "Polish" notation because people had trouble spelling and > pronouncing his name. And yes, I looked it up to get it right. :) > > 2. That was pretty much that until computers and programming languages > came on the scene. But in the olden days, when every electron was > precious and compactness and efficiency were of the utmost import, it > turned out that *reverse* Polish notation was *slightly* more > efficient. If you look at a parser for algebraic expressions and the > resulting run-time execution engine, you'll see that. > > 3. Lisp used prefix notation because McCarthy was a disciple of Church > and Church used it. Forth used reverse Polish notation because Chuck > Moore had taken apart the Burroughs compilers and stack architecture > and determined that it was the way to go for maximum compactness and > efficiency. > > But the efficiency differences really are negligible these days, and > Lisp / Scheme are much more popular than Forth. Incidentally, the RPL > stands for "Reverse Polish Lisp". > Very interesting Ed. Thanks for the contribution. ~t -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Tom Cloyd, MS MA, LMHC - Private practice Psychotherapist Bellingham, Washington, U.S.A: (360) 920-1226 << tc / tomcloyd.com >> (email) << TomCloyd.com >> (website) << sleightmind.wordpress.com >> (mental health weblog) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~