Should be: Goodnight, Perl 6.
Posted Feb 11, 2013 8:53 UTC (Mon) by khim
In reply to: Should be: Goodnight, Perl 6.
Parent article: Chromatic: Goodnight, Parrot
I mean, come on, it can't even collect reference cycles.
Why is it a problem? Refcounting it probably the best compromise between predictability and convenience. Note how MacOS is losing the much lauded ability to handle reference cycles.
Sure, you get an instrument which is less pleasing from the abstract beauty POV but which is infinitely more usable: you can use it to track external resources, you know exactly how much memory is used at any particular moment, etc. And it's not as if you can't leak memory with "proper" garbage collector. Proponents of "full-blown" garbage collectors start foaming at this point and explain how these memory leaks are not memory leaks at all but the fact remains: when your program runs out of memory it does not matter if your leaks are "real" (and can be removed by a "proper" garbage collector) or "unreal" (and thus will be around no matter what you do).
If you know and can guarantee that all the references to "dead" data structures will be eliminated then usually it's easy to do the next extra step and break cycles apart, too, and if your data structures are so complex that you can't tear up the cycles then usually your program will consume endless amount of memory for "non-leaks" in some cases anyway.
to post comments)