Fantastic. Thanks.
And thanks for all other replies, everyone. As stated before, this was
just a hypothetical problem (that would be solved using other methods
if it were programmed in Lisp).
However, from some of the other replies I get the impression that it
would still be a bad idea to do in Lisp for the simple reason that GC
isn't guaranteed to be instant (or even to happen before program
termination for that matter).
Still, fun to think about.
Jeff M.
Jeff M. wrote:
> Fantastic. Thanks.
>
> And thanks for all other replies, everyone. As stated before, this was
> just a hypothetical problem (that would be solved using other methods
> if it were programmed in Lisp).
>
> However, from some of the other replies I get the impression that it
> would still be a bad idea to do in Lisp for the simple reason that GC
> isn't guaranteed to be instant (or even to happen before program
> termination for that matter).
When you look at language specs, they don't guarantee a whole lot. A
fully conforming version of C++ could implement malloc like this:
void* malloc( size_t ) {
return NULL;
}
So don't get worried about what the standard guarantees, worry about
what implementations do. And the great majority of Lisp implementations
*do* collect garbage.
-- MJF
M Jared Finder wrote:
> Jeff M. wrote:
>
> > However, from some of the other replies I get the impression that it
> > would still be a bad idea to do in Lisp for the simple reason that
> > GC isn't guaranteed to be instant (or even to happen before program
> > termination for that matter).
>
> ...the great majority of Lisp
> implementations do collect garbage.
>
I meant moreso to imply that the GC may not collect the memory until
much later when it is needed. And, if not needed until program
termination, not collect it.
Jeff M.
--
http://www.retrobyte.org
··············@gmail.com