From: Dylan Evans Date: 2009-02-25T15:57:48+09:00 Subject: Re: Nexus Programming Language --001485f499eea7686d0463b8c3fc Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On Wed, Feb 25, 2009 at 8:30 AM, Chad Perrin wrote: > On Tue, Feb 24, 2009 at 05:07:05AM +0900, M. Edward (Ed) Borasky wrote: > > > > 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. > > More than that -- and still relevant today -- parsers for Polish notation > are generally more difficult to *write*. I know -- I've tried designing > both Polish notation parsers and RPN parsers. In fact, Polish notation > parsers are more difficult to write for essentially the same reason that > RPN parsers are slightly more efficient from the machine's point of view. > That's seems funny because bison uses RPN as an example. The syntax isn't complex and once you have tokens you just need to shift the values onto a stack and when an operator comes along you just apply it to the last two values then push the result. Or you can create a tree where each value becomes a node and the following operation the parent. -- The UNIX system has a command, nice ... in order to be nice to the other users. Nobody ever uses it." - Andrew S. Tanenbaum --001485f499eea7686d0463b8c3fc--