[Date Prev] [Date Next] [Thread Prev] [Thread Next] Date Index Thread Index Search archive:
Date:Mon Jan 27 13:59:49 1998 
Subject:Re: GC versus stack (was Re: Complexity) 
From: Robin Popplestone  
Volume-ID:980127.04 

Mr Breinholt writes

> On the other hand it would seem that pure functional languages would be
> an excellent match for using a stack based allocation system.

> I just started reading a book by Simon L. Peyton Jones, _Implementing
> Functional Languages_.


P17 of Peyton Jones "The Implementation of Functional Programming Language"
shows how to implement basic LISP operations of CONS HEAD TAIL in a  purely
functional language with NO explicit  provision of data-structures AT  ALL.
So the rationale for requiring garbage collection in LISP [which is nothing
to do  with the  identification, or  quasi-identification, of  program  and
data] is exactly present for all  functional languages. The only debate  is
whether Procedure Activation  Records themselves should  be allocated  on a
stack or not.

The fact that functional languages inherently provide data-structures is
not new. I remember Peter Landin pointing it out in 1967, and of course,
it's inherent in Church's work in the 1930's.

Robin.