http://www.perlmonks.org?node_id=261996


in reply to Perl 6 feature that scares me the most:

My vote went to Garbage Collection. I wouldn't object to a well-tuned gc built into Perl6's memory management, but current thinking seems to involve delaying all release of system resources. Timely destruction is lost by dragooning mark-and-sweep gc into the quest for correct destruction of circular chains of reference.

In On timely destruction?, Elian asked for opinions on the importance of a timely destruction guarantee. There were plenty of good answers supporting that need, but it soon became obvious that the decision had already been made.

This is the frightening part.

Without the ability to release system resources in a timely and ordered manner, Perl6 will lose Perl's greatest advantage - its ability to be useful for many purposes. Interaction with sockets, files, pipes, signals, and external processes all become subject to indeterminate delays and mysterious races. Exactly the sort of thing that makes Java so bad for such work.

I think there is a path out of this.

  1. Keep gc for its strengths; levelling memory management overhead, and reducing memory fragmentation.
  2. Make object destruction as timely and ordered as we can.
  3. Civilize circular references some other way.

No, I don't have a design for that last. I'm thinking about it.

There is too much baby left in that bathwater. Don't collect it.

After Compline,
Zaxo