Forth like interpreter

William Tanksley wtanksle at dolphin.openprojects.net
Sun Mar 19 01:08:43 CET 2000


On Sun, 12 Mar 2000 19:26:26 GMT, Darrell wrote:
>Samuel A. Falvo II wrote:

>> And there you have it.

>Looks like you know a thing or two about this stuff.

He's done some work with it, and written a few Forths.

>Would have thought subroutine threading was faster. I'll have to visit
>comp.lang.forth.

It generally is faster.

>> Also, implementing continuations in a language like Forth would be a
>> living
>> hell so severe that Satan wouldn't want to approach it.  The reason is
>> that continuations require the use of garbage collection.

>Could I say that your a Forth purist?

Sure.  :-)

>I use Forth to describe the family of TIL's that can evolve quickly because
>they are expressed as a single strand of RNA. Maybe I need another term for
>them.

I'm not offended by that characterization -- in fact, I'd like a link so I
can read more about your work.  I assume that you're working on genetic
algorithms?

However, a formal term for that type of language is a "concatenative"
language.  In Forth and other concatenative language, you pass data from
one function to another by concatenating them in the source.

There's a much more lucid description of the characteristics of
concatenative languages at
http://www.latrobe.edu.au/www/philosophy/phimvt/j00syn.html.

>Forth's dictionary being a singly linked list of variable sized arrays
>packed end to end does seem like a garbage collection problem. I've made a
>TIL dictionary a hash table and added reference counting in the past. But as
>you've said that wouldn't be Forth. And I'll use that as my defense when
>someone slams me for talking too much Forth in the Python group.

That alone would not be enough to make it non-Forth.  But then I've never
been one to spend time talking about what is and isn't Forth; when I argue
classifications, I prefer to argue the bigger, better-defined ones, such
as the distinction between concatenative languages (Postscript, Forth,
Joy) and applicative ones (C, ML, Haskell, Lisp).

>--Darrell

-- 
-William "Billy" Tanksley



More information about the Python-list mailing list