http://www.perlmonks.org?node_id=905403
tangent's user image
User since: May 18, 2011 at 02:41 UTC (13 years ago)
Last here: Mar 14, 2024 at 17:30 UTC (2 weeks ago)
Experience: 7166
Level:Parson (16)
Writeups: 549
Location:Ireland
User's localtime: Mar 28, 2024 at 13:10 UTC
Scratchpad: View
For this user:Search nodes
Watch for posts by this user

Illuminating facts about Perl: (work in progress)

Illuminating perlmonks nodes: (work in progress)

Favourite Larry Wall quote:

Part of what's confusing the issue is that DESTROY is a verb. It was done that way by analogy to FETCH and STORE, but the use of a verb is unfortunate, in retrospect. I should have named it something like YOU_ARE_ABOUT_TO_BE_SHOT_DO_YOU_HAVE_ANY_LAST_WORDS.

Just as an object oriented design will often separate initializers from constructors, it will also separate finalizers from destructors. DESTROY is designed to be a destructor that can call a finalizer, but to confuse it with a finalizer would be, er, confusing.