Related articles |
---|
[18 earlier articles] |
Re: Compiler writers will love this language joachim.durchholz@web.de (Joachim Durchholz) (2003-07-02) |
Re: Compiler writers will love this language strohm@airmail.net (John R. Strohm) (2003-07-02) |
Re: Compiler writers will love this language genew@mail.ocis.net (2003-07-02) |
Re: Compiler writers will love this language ericmuttta@email.com (2003-07-02) |
Re: Compiler writers will love this language mwotton@cse.unsw.edu.au (2003-07-03) |
Re: Compiler writers will love this language nmm1@cus.cam.ac.uk (2003-07-04) |
Re: Compiler writers will love this language nmm1@cus.cam.ac.uk (2003-07-04) |
Re: Compiler writers will love this language joachim.durchholz@web.de (Joachim Durchholz) (2003-07-13) |
Re: Compiler writers will love this language ericmuttta@email.com (2003-07-15) |
Re: Compiler writers will love this language nmm1@cus.cam.ac.uk (2003-07-15) |
From: | nmm1@cus.cam.ac.uk (Nick Maclaren) |
Newsgroups: | comp.compilers |
Date: | 4 Jul 2003 00:00:59 -0400 |
Organization: | University of Cambridge, England |
References: | 03-05-211 03-06-015 03-06-054 03-06-057 03-06-078 03-06-106 03-07-012 |
Keywords: | storage, GC |
Posted-Date: | 04 Jul 2003 00:00:59 EDT |
"John R. Strohm" <strohm@airmail.net> writes:
|>
|> The problem with reference-counting GC has been known for close to twenty
|> years that I personally know of. From the well-known "AI Koans":
I have known about it for nearly 40, and am no specialist! My guess
is that it dates from the days of early LISP, at the latest.
|> One day a student came to Moon and said: "I understand how to make a better
|> garbage collector. We must keep a reference count of the pointers to each
|> cons."
|> Moon patiently told the student the following story:
|>
|> "One day a student came to Moon and said: `I understand
|> how to make a better garbage collector...
|>
|> [Pure reference-count garbage collectors have problems with circular
|> structures that point to themselves.]
|>
|> Note that a doubly-linked list falls into this category...
Yes. But it IS a better garbage collector, in the case when such
references are not a problem. Take, for example, the following
language design:
Object ownership is strictly hierarchical (DAG, not tree - let's
not be unreasonably restrictive), and hard links (i.e. counted
references) exist within the ownership model.
The language allows the spawning of independent threads, with
some half-sane semantics. The point about this is only that,
without it, you can do static garbage collection and don't need
even reference counting.
Unrestricted pointers are soft links, constrained to be
relative to a specific object. EITHER their scope is such so that
the object's life must be longer than theirs (e.g. Algol 68) OR
they are specified in such a way that a soft link reference can
fail ("Object no longer exists").
The advantages of such a language for software engineering over
most current ones are legion - you can do some serious reasoning
and checking of memory resource usage, for a start. And you can
use reference counting garbage collection :-)
Regards,
Nick Maclaren.
Return to the
comp.compilers page.
Search the
comp.compilers archives again.