develooper Front page | perl.perl5.porters | Postings from February 2012

Re: [perl #109408] Documentation that refers to Perl 5 as new

Thread Previous | Thread Next
Leon Timmermans
February 2, 2012 01:20
Re: [perl #109408] Documentation that refers to Perl 5 as new
Message ID:
On Thu, Feb 2, 2012 at 2:30 AM, Tom Christiansen <> wrote:
> It's that you cannot guarantee that destructors are *ever* called
> in Java — nor, now because of J(ava-P)ython, in Python either.
> That means you cannot hope to have a destructor duly called to
> free up a non-memory resource.  They might never happen at all,
> and in fact, in most JVM implementations, never do get called
> at all in the normal course of running.  At all, I said.  Scary.
> It's a very different resource-management (non-)strategy than
> we're accustomed to in Perl, where the only non-determinism I'm
> aware of with destructors is their order of firing when several
> logically achieve a refcount of 0 "simultaneously".

This is also known as Resource Acquisition Is Initialization, which is
the poorest name for a programming pattern ever.


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About