develooper Front page | perl.perl6.language | Postings from February 2001

Re: Garbage collection (was Re: JWZ on s/Java/Perl/)

Thread Previous | Thread Next
From:
Peter Scott
Date:
February 13, 2001 10:39
Subject:
Re: Garbage collection (was Re: JWZ on s/Java/Perl/)
Message ID:
4.3.2.7.2.20010213103926.00ab2100@psdt.com
At 06:35 PM 2/13/01 +0000, Nicholas Clark wrote:

> > This may be a naive question, but what is the benefit - aside from
> > consistency, and we don't need to rehash the litany on that - to AUTOLOAD
> > getting called for DESTROY?  I've never actually seen any code that makes
> > use of it.  I have grown somewhat tired of writing, and teaching, "return
> > if $AUTOLOAD =~ /:DESTROY$/", however.
>
>Doesn't
>
>   sub DESTROY {}
>
>have the same effect but with less typing?

Sure (with debatable comments about maintainability since the declaration 
is decoupled from the reason - sub AUTOLOAD - for it being there), but the 
point still stands.
--
Peter Scott
Pacific Systems Design Technologies


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About