How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

Elizabeth D Rather erather at forth.com
Wed Aug 18 23:05:24 EDT 2010


On 8/18/10 2:23 PM, Standish P wrote:
> On Aug 17, 6:38 pm, John Passaniti<john.passan... at gmail.com>  wrote:
>
>> You asked if Forth "borrowed" lists from Lisp.  It did not.  In Lisp,
>> lists are constructed with pair of pointers called a "cons cell".
>> That is the most primitive component that makes up a list.  Forth has
>> no such thing; in Forth, the dictionary (which is traditionally, but
>> not necessarily a list) is a data structure that links to the previous
>> word with a pointer.
>
> Would you show me a picture, ascii art or whatever for Forth ? I know
> what lisp lists look like so I dont need that for comparison. Forth
> must have a convention and a standard or preferred practice for its
> dicts. However, let me tell you that in postscript the dictionaries
> can be nested inside other dictionaries and any such hiearchical
> structure is a nested associative list, which is what linked list,
> nested dictionaries, nested tables are.

You indicated that you have a copy of Forth Application Techniques. 
Sections 8.1 and 8.2 cover this topic, with some drawings.

Cheers,
Elizabeth

-- 
==================================================
Elizabeth D. Rather   (US & Canada)   800-55-FORTH
FORTH Inc.                         +1 310.999.6784
5959 West Century Blvd. Suite 700
Los Angeles, CA 90045
http://www.forth.com

"Forth-based products and Services for real-time
applications since 1973."
==================================================



More information about the Python-list mailing list