Re: Is anything easier to do in java than in lisp?
From: Luke Gorrie (luke_at_bluetail.com)
Date: 06/22/04
- Next message: Debian: "Re: si(x) in Maxima (Was: Mathematica vs. Lisp)"
- Previous message: Albert Reiner: "si(x) in Maxima (Was: Mathematica vs. Lisp)"
- In reply to: Joe Marshall: "Re: Is anything easier to do in java than in lisp?"
- Next in thread: RobertMaas_at_YahooGroups.Com: "Re: Is anything easier to do in java than in lisp?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 22 Jun 2004 11:58:31 +0200
Joe Marshall <prunesquallor@comcast.net> writes:
> Erann Gat <gNOSPAMat@flownet.com> writes:
>
>> GC is also potentially a lot faster for side-effect-free code.
>
> Yes! Thanks for mentioning that. The `write-barrier' for
> generational GC does not need to apply to newly allocated storage, and
> ephemeral garbage costs practically nothing.
I don't know where this fits into the larger world of GC, but I heard
about a neat trick for some purely functional languages.
If you disallow mutation you can have the invariant that no object in
the heap points to any object newer than itself, and if you order
objects in memory from oldest to newest then all the pointers will
point "backwards." You can then mark-and-sweep the heap in a single
pass by starting at the newest object and going backwards: any object
that has not been marked by the time you reach it must be garbage,
since none of the older objects can possibly point to it.
Described in this paper:
http://citeseer.ist.psu.edu/armstrong95one.html
I think you need to ban letrec as well as mutation. No idea how
practical this is wrt other algorithms, but I think it's neat :-)
Cheers,
Luke
- Next message: Debian: "Re: si(x) in Maxima (Was: Mathematica vs. Lisp)"
- Previous message: Albert Reiner: "si(x) in Maxima (Was: Mathematica vs. Lisp)"
- In reply to: Joe Marshall: "Re: Is anything easier to do in java than in lisp?"
- Next in thread: RobertMaas_at_YahooGroups.Com: "Re: Is anything easier to do in java than in lisp?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]