[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: VM optimization (was Re: Re[2]: Still cryptic OOP syntax)
- From: skaller <skaller@...>
- Date: 01 Feb 2005 12:23:57 +1100
On Tue, 2005-02-01 at 05:15, David Olofson wrote:
> On Monday 31 January 2005 17.15, Mark Hamburg wrote:
> > Not applicable to Lua without whacking pretty much everything, but
> > Forth is very interesting
> That means operations and operands are inherently lists, rather than
> trees?
Forth is Lisp backwards. It uses reverse polish
(postfix) notation:
1 2 add -- forth
1 + 2 -- C
(add 1 2) -- Lisp
This means the grammar of Forth, like Lisp, is very simple:
word = word *
is the whole of it. This has the property that for any
sequence of words you can define a subroutine,
and replace the sequence by the subroutine.
Note Forth is heavily used today.. Postscript IS forth.
The forth execution model is also very simple:
(a) if it is a number, push it onto the stack
(b) otherwise execute it
--
John Skaller, mailto:skaller@users.sf.net
voice: 061-2-9660-0850,
snail: PO BOX 401 Glebe NSW 2037 Australia
Checkout the Felix programming language http://felix.sf.net