garbage collection

62 views
Skip to first unread message

Tim Meehan

unread,
Oct 25, 2020, 1:10:36 PM10/25/20
to Racket Users
I'm in a very small programming operation, and I am trying to get my co-workers to try out Racket, or at least tolerate some of the tools being written in Racket. One of them has a very simple decision tree that he uses to evaluate programming languages: "does it have a garbage collector?", if yes, reject ...

It doesn't seem to be a speed thing, it seems to be that he is convinced that the designers of the garbage collectors look for bad times to go to work and screw up what he's doing. (You guys don't do that, right? 😀)

It got me thinking though - is it possible to run modern Lisp-y languages without a garbage collector? Is it even smart to try? I know that there must be a trade off, I just didn't know enough about what was traded off to explain it to him.

Daniel Prager

unread,
Oct 25, 2020, 3:32:05 PM10/25/20
to Tim Meehan, Racket Users
 is it possible to run modern Lisp-y languages without a garbage collector? Is it even smart to try?

John Clements

unread,
Oct 25, 2020, 4:41:45 PM10/25/20
to Tim Meehan, Racket Users
It depends a lot on what you mean by a “Lisp-y” language. I’m certainly not going to disagree with the sentiments expressed in the stack overflow post that Dan Prager posted… after all, I wrote the top-posted one! You’re asking a question about persuading a co-worker, though. In my opinion, the best line of argument to use with people like this is that you could be trading CPU time against human developer time. I think it’s moderately non-controversial to suggest that writing code in languages without a garbage collector creates new opportunities for things to break, and therefore incurs a higher development and maintenance cost. If the software is going to be run enough, then maybe you can make an argument that the tradeoff is worth it. If it’s not on a critical path, though, then reducing development time is probably the better choice.

In my opinion, moving the discussion up one level (cost benefit analysis) reduces the opportunity for banging heads on the merits of garbage collection itself.

And, with that said, changing peoples’ minds is generally impossible.

John
> --
> You received this message because you are subscribed to the Google Groups "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to racket-users...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/CACgrOxLZXa%2BLUhX4sWbdg8PtjnoiSw_yeSDMg7OoV9HSEMRweA%40mail.gmail.com.



Hendrik Boom

unread,
Oct 25, 2020, 5:08:34 PM10/25/20
to Racket Users
On Sun, Oct 25, 2020 at 04:41:41PM -0400, 'John Clements' via Racket Users wrote:
> It depends a lot on what you mean by a “Lisp-y” language. I’m certainly not going to disagree with the sentiments expressed in the stack overflow post that Dan Prager posted… after all, I wrote the top-posted one! You’re asking a question about persuading a co-worker, though. In my opinion, the best line of argument to use with people like this is that you could be trading CPU time against human developer time. I think it’s moderately non-controversial to suggest that writing code in languages without a garbage collector creates new opportunities for things to break, and therefore incurs a higher development and maintenance cost. If the software is going to be run enough, then maybe you can make an argument that the tradeoff is worth it. If it’s not on a critical path, though, then reducing development time is probably the better choice.
>
> In my opinion, moving the discussion up one level (cost benefit analysis) reduces the opportunity for banging heads on the merits of garbage collection itself.
>
> And, with that said, changing peoples’ minds is generally impossible.

The big question is:

Is this a program where short pauses would be critical?

If not, you can afford a garbage collector.
If so, you should use a language without a garbage collector, perhaps Rust,
or else not have any tricky data structures that have to be freed.

P.S. If the lists are noncircular, reference counting works. Provided
your languages manages it properly. I suspect Rust does. Limbo uses it
as the preferred means for garbage collection, with a regular garbage
collector as a backup, needed only when there are lost circular lists.

-- hendrik

>
> John
>
>
> > On Oct 25, 2020, at 10:10, Tim Meehan <btme...@gmail.com> wrote:
> >
> > I'm in a very small programming operation, and I am trying to get my co-workers to try out Racket, or at least tolerate some of the tools being written in Racket. One of them has a very simple decision tree that he uses to evaluate programming languages: "does it have a garbage collector?", if yes, reject ...
> >
> > It doesn't seem to be a speed thing, it seems to be that he is convinced that the designers of the garbage collectors look for bad times to go to work and screw up what he's doing. (You guys don't do that, right? 😀)
> >
> > It got me thinking though - is it possible to run modern Lisp-y languages without a garbage collector? Is it even smart to try? I know that there must be a trade off, I just didn't know enough about what was traded off to explain it to him.
> >
> > --
> > You received this message because you are subscribed to the Google Groups "Racket Users" group.
> > To unsubscribe from this group and stop receiving emails from it, send an email to racket-users...@googlegroups.com.
> > To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/CACgrOxLZXa%2BLUhX4sWbdg8PtjnoiSw_yeSDMg7OoV9HSEMRweA%40mail.gmail.com.
>
>
>
> --
> You received this message because you are subscribed to the Google Groups "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to racket-users...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/22ce3dfa-b2bb-4484-a43f-ff190461fbdb%40mtasv.net.
Reply all
Reply to author
Forward
0 new messages