home .. forth .. colorforth mail list archive ..

[colorforth] explicit vs. implicit


This is probably not an original observation, but the computation forms a
tree both in Lisp and Forth. The difference is in Lisp the tree is
explicit and in Forth the tree is implict.

Take the expression:

(x+y)*z

in Lisp:

(* (+ x y) z)

in Forth ( z y x -- t ):

+ *

The tree representing the result takes form of:

         *
       /   \
      +     z
    /   \
   x     y

Lisp builds the tree explictly top down, Forth builds the tree implictly
bottom up. The differences probably carry with them various
advantages/disadvantages.

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: colorforth-unsubscribe@xxxxxxxxxxxxxxxxxx
For additional commands, e-mail: colorforth-help@xxxxxxxxxxxxxxxxxx
Main web page - http://www.colorforth.com