Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

(tye)Re2: Perl 6

by tye (Sage)
on Jan 15, 2002 at 06:53 UTC ( [id://138794]=note: print w/replies, xml ) Need Help??


in reply to Re: (tye)Re: Perl 6
in thread Perl 6

Several people have been talking about Perl6 not using reference counting. I've also heard that they want Perl6 to work with the Java Virtual Machine which won't support reference counting.

In my research, I find that the only way to get timely destructors (other than the near trivial case of lexical variables that you never take a reference of) is via reference counting.

In C++, timely destructors for lexical variables (where "taking a reference" does not cause the variable to live longer) is almost enough. In Perl, having timely destructors only for lexical variables would make certain hard problems that are easy to solve in Perl 5 become extremely hard in Perl 6.

It would boil down to building your own reference counting system on top of Perl. And anyone who has done much work with C++ knows that bolting on "ref-counted poiners" really sucks compared to native timely destructors.

The other risk with a new garbage collection system in Perl 6 is that destructors may not be well-ordered either. That is, if $a has a reference to $b, you want $a to get destroyed _before_ $b. I can't recall if the garbage collection systems under consideration are able to ensure that.

But I haven't heard any news on this since I posted the node you replied to.

Um, so, sorry, no new resources.

        - tye (but my friends call me "Tye")

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://138794]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (2)
As of 2024-04-25 22:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found