Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It's good enough by itself if you tell programmers not to create circular references and explicitly use weak references if they really need to. That opens you up to memory leaks from accidental circular references, of course, but again, it's a worthwhile tradeoff for many projects.


When you have a scripting language with a GC you are targeting a class of users who can't or don't want to be careful enough to prevent circular references.

Circular references aren't easy to avoid, sometimes there can be more than 3 levels of indirection. The mental overhead of preventing circular references is often times as high as manually managing memory yourself.

If it was as good as you suggest, every new language would be using reference counting and not occasionally run mark and sweep.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: