Be gentle with me....

Samuel A. Falvo II kc5tja at garnet.armored.net
Tue Dec 7 22:14:33 EST 1999


In article <slrn84rc90.1do.neelk at brick.cswv.com>, Neel Krishnaswami wrote:
>Does every Forth word have a fixed number of arguments? That seems
>like the only way it could work.

Some Forth words can accept variable number of arguments (the word[s] which
convert a number on the stack into a printable number are an example of such
words).  In addition, some words can return multiple results as well (FIND
comes to mind).

Yet, combined with colon definitions, immediate words, and the EVALUATE
word, Forth's execution model can rival, and in some cases, exceed, Lisp's
own macro subsystem.

>and therefore proves by example that Lisp is not the sole right way to
>design a language. He goes on to say that he's a bit worried by the
>fact that it's the *only* counterexample he has found.... :)

Lisp and Forth are indeed diabolical opposites.  What I find ironic is that
it is the opposite nature of the two languages which makes them immensely
similar to each other.  For instance, because Forth environments generally
don't have garbage collection (some do have conservative collectors), you
tend to write your code to be more memory concious(sp?) than you would under
Lisp.  What takes almost no memory to do in Forth would take up triple the
memory normally used in Lisp, and vice versa.

Trivia: The creator of Forth studied under the creator of Lisp, and are
reportedly very good friends.  I also find it interesting to see the people
in comp.lang.lisp throw their noses up at almost any language on the planet.
Yet, when one person says they're familiar with Forth, they welcome them
with warm hearts.

-- 
KC5TJA/6, DM13, QRP-L #1447
Samuel A. Falvo II
Oceanside, CA



More information about the Python-list mailing list