I think the important thing is to consider just how costly
the other options are. I'm no expert when it comes to GC, but there
are a myriad of options available and I think that timely
destruction has one particular benefit: consistancy.
The timely deterministic options (which, in a language with references, is
singular--refcounting) are expensive, both in processor time and in
programming time. Also rather error-prone, unfortunately.
They also don't guarantee consistency, though they do guarantee
determinism. Not that you're necessarily going to guess the time
right, but you've a reasonably good chance.
To take one particular operation and declare "This could
happen at any old time" instantly puts the programmer into headache
That's always true, though. Perl is sufficiently introspective, and
is getting more introspective, to make timing of destruction potentially
indeterminate. And most objects don't have
DESTROY methods. Just wait until we start throw
I see little choice but to make timely GC an option, but I am
confident that there is enough collective brainpower available to make
it efficient as an option under reasonable
Thanks for the vote of confidence, bu I should point out that I am
the brainpower in this case,
along with a stack of books and papers by people rather more clever
than I am. If it was easy or inexpensive to do this, I wouldn't be
asking the question.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||