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
From:
Leon Timmermans
Date:
February 2, 2012 01:20
Subject:
Re: [perl #109408] Documentation that refers to Perl 5 as new
Message ID:
CAHhgV8h0bRQgP==t5+GLq4SDU8_TvBgjRYqgJNhs5YM-+bJjHA@mail.gmail.com
On Thu, Feb 2, 2012 at 2:30 AM, Tom Christiansen <tchrist@perl.com> 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.

Leon

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