From: -BMC-
Subject: Where is the class constructors/destructors in common lisp
Date: 
Message-ID: <420afd96.0412071805.f428d4c@posting.google.com>
So new to programming you could pat me on the head and mutter "Yes,
sonny." --  Here's my query:

Are not some Lisp implementations themselves ?written/compiled? by
'other languages'? In which case are not the memory management
facilities of said Lisp implementation ultimately just those of the
underlying 'other language'?

From: ··············@hotmail.com
Subject: Re: Where is the class constructors/destructors in common lisp
Date: 
Message-ID: <1102473428.416335.34170@z14g2000cwz.googlegroups.com>
You are experiencing a "category error."

Implementations of any language allow programs to make use of the
resources managed by an underlying operating system. Operating systems
are not 'other langauges.'
From: Peter Seibel
Subject: Re: Where is the class constructors/destructors in common lisp
Date: 
Message-ID: <m3sm6hpmf2.fsf@javamonkey.com>
·······@morrisonhershfield.com (-BMC-) writes:

> So new to programming you could pat me on the head and mutter "Yes,
> sonny." -- Here's my query:
>
> Are not some Lisp implementations themselves ?written/compiled? by
> 'other languages'? In which case are not the memory management
> facilities of said Lisp implementation ultimately just those of the
> underlying 'other language'?

Well, yes and no. For instance in C the "memory management facilities"
are (more or less) malloc and free which allow a program to request a
chunk of memory and free it. However you could implement Lisp in C
with a program that malloc's a huge chunk of memory up front and never
frees it and then manage all the "allocations" needed by Lisp by
handing out some memory in that chunk. The Lisp implementation (i.e.
the C program) would then be responsible for keeping track of what
memory was in use and what is available to be used for subsequent Lisp
allocations. So there's a layer of memory management facilities
provided by the host language, C in this case, and there's another
layer of mememory management handled by the Lisp implementation. Now,
if you implemented Lisp in a language that had garbage collection,
such as Java, you might be able to leverage the underlying memory
management more--if you can translate Lisp allocations into
allocations of Java objects then the Java garbage collector will take
care of everything for you. Or, at the other end of the spectrum, if
you wrote a Lisp implementation in assembly, you'd have even more
primitive memory management facilities to start with and would have to
build ever more yourself.

-Peter

-- 
Peter Seibel                                      ·····@javamonkey.com

         Lisp is the red pill. -- John Fraser, comp.lang.lisp
From: Kenny Tilton
Subject: Re: Where is the class constructors/destructors in common lisp
Date: 
Message-ID: <4Attd.66940$Vk6.64005@twister.nyc.rr.com>
-BMC- wrote:

> So new to programming you could pat me on the head and mutter "Yes,
> sonny." --  Here's my query:
> 
> Are not some Lisp implementations themselves ?written/compiled? by
> 'other languages'? In which case are not the memory management
> facilities of said Lisp implementation ultimately just those of the
> underlying 'other language'?

I have been programming everything from OpenGL to crossword puzzles to 
Robotic soccer sim clients to massive enterprise level apps for the 
pharmaceutical industry, but I do not know how Lisp implementations 
manage memory. <hint>

Want to know how I did it in my 100k LOC C app before I found Lisp? 
/That/ I can tell you. <hint>

:)


kenny

-- 
Cells? Cello? Celtik?: http://www.common-lisp.net/project/cells/
Why Lisp? http://alu.cliki.net/RtL%20Highlight%20Film
From: Christopher C. Stacy
Subject: Re: Where is the class constructors/destructors in common lisp
Date: 
Message-ID: <u653dw86n.fsf@news.dtpq.com>
·······@morrisonhershfield.com (-BMC-) writes:

> So new to programming you could pat me on the head and mutter "Yes,
> sonny." --  Here's my query:
> 
> Are not some Lisp implementations themselves ?written/compiled? by
> 'other languages'? In which case are not the memory management
> facilities of said Lisp implementation ultimately just those of the
> underlying 'other language'?

No.  For example, you could write a program that computes eigenvectors,
but there is no operator built-in to the  C or Lisp language that finds
the roots of the characteristic polynomial of the matrix.
Lisp, and it's memory management, are just another program like that one.

Ultimately, Lisp and C just flip some transistors on and off,
if that's what you mean.   But that's hardly interesting.