Not too long ago, I removed the string_destroy() function.[..]

I can certainly see the desirability of deleting functions not
currently needed, as a way of shrinking the code base, thus
making it easier to alter during this early phase of its life.

But what struck me a while back when some gc hook functions were
deleted, is that code also serves as memory and design plan, and
something is lost when bits of that framework go away.

Others are in a far better place to make this tradeoff than I.
But one idea which came to mind, is that along with our TODO and
KNOWN_ISSUES files, perhaps we could also use a THINGS_TO_REVISIT
file.  Or DELETED_CODE.  Or something.  When things get deleted,
they go in here, so they aren't lost from the collective memory.
They serve as reminders of things once thought important, and if
and when we need some of them back, we haven't lost the thought
which is embedded in them.

string_destroy() seems a quite plausible candidate for deleting.
The gc hook functions kind of worried me at the time.  I'd be
interest in peoples' thoughts on how one handles this kind of
thing well.  Is anyone wearing a code librarian hat?

Musing,
Mitchell


   Date: 23 Dec 2002 07:45:59 -0000
   Subject: Re: [perl #19356] [PATCH] creating string_destroy()
   In-Reply-To: <rt-19356@perl>
   Message-Id: <[EMAIL PROTECTED]>
   Reply-To: [EMAIL PROTECTED]
   To: [EMAIL PROTECTED]
   From: Leopold Toetsch (via RT) <[EMAIL PROTECTED]>

   [EMAIL PROTECTED] (via RT) wrote:

   > # New Ticket Created by  [EMAIL PROTECTED] 
   > # Please include the string:  [perl #19356]
   > # in the subject line of all future correspondence about this issue. 
   > # <URL: http://rt.perl.org/rt2/Ticket/Display.html?id=19356 >
   > 
   > 
   > This patch creates a new function string_destroy(),

   Not too long ago, I removed the string_destroy() function. With our 
   DOD/GC scheme we IMHO don't need it - strings go away, when they are 
   unused. And second the string_destroy function must have detailed 
   knowledge of Buffers, COWed strings and underlaying allocator (malloc 
   type or copying).
   I want to have this logic just in one place.

   leo

Reply via email to