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