Front page | perl.perl6.language |
Postings from August 2001
From: Jan Dubois
August 28, 2001 20:53
Message ID: email@example.com
On Tue, 28 Aug 2001 18:35:34 -0700, Damien Neil <firstname.lastname@example.org> wrote:
>On Tue, Aug 28, 2001 at 09:07:03PM -0400, Sam Tregar wrote:
>> Well, there's the Perl 5 reference counting solution. In normal cases
>> DESTROY is called as soon as it can be. Of course we're all anxious to
>> get into the leaky GC boat with Java and C# because we've heard it's
>> faster. I wonder how fast it is when it's halfway under water and out of
>> file descriptors.
>Speaking purely for myself, I'd rather have a non-refcounting GC
>because I'm rather tired of going through elaborate tricks to avoid
>ever creating circular data structures.
Have you actually tried working in a purely mark-and-sweep style GC
environment (Java/.NET)? You don't have deterministic destruction order,
which means that effectively you don't have DESTROY *at all*. Don't even
think about using finalizers; they are almost completely useless.
Everything that needs any kind of cleanup must be managed manually. I
find that extremely painful and prefer refcounting any day. Maybe I'm
Avoiding circular references is not that hard if you never store
references into package variables. Just remember to break the circle
manually before you loose the last reference to it. :)