Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

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")

In reply to (tye)Re2: Perl 6 by tye
in thread Perl 6 by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (7)
As of 2024-04-23 19:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found