Re: Re: Re: my garbage collector sucks
Paul Prescod <[email protected]>
| Newsgroups | gmane.comp.lang.prothon.user |
|---|---|
| Message-ID | <[email protected]> |
Joe Mason wrote: >... > You are confusing memory allocation with resource allocation. Memory allocation *IS* resource allocation. What is memory if not a resource? > ... The > garbage collector, be it refcounting or mark-and-sweep, only reclaims > memory - it is up to you to deal with file handles and similar > resources. Yes, because they are limited to dealing with a particlar resource rather than resources in general. >... > Yes, this means you still have to manually track a whole bunch of > things, even with GC. That's life. I didn't claim otherwise. What I find odd is that rather than acknowledging that this is a performance tradeoff one makes by switching to (better performing) mark and sweep garbage collectors, people act as if it is just the way the universe is and will always be. The argument that I shouldn't expect my language to close files for me is exactly equivalent to the argument of five years ago that I shouldn't expect my language to free memory for me. That doesn't mean that it is wrong to make the tradeoff for performance: just don't tell me that I'm not losing anything when I clearly am. Paul Prescod