logoalt Hacker News

ameliusyesterday at 10:09 AM1 replyview on HN

But there could be a smoother path between having a GC and having no GC.

Right now, you'd have to switch languages.

But in a Great Language you'd just have to refactor some code.


Replies

troadtoday at 12:09 AM

Why would you have to switch languages? There are no languages with 'no GC', there are only languages with no GC by default.

Take C - you can either manually manage your memory with malloc() and free(), or you can #include a GC library (-lgc is probably already on your system), and use GC_malloc() instead. Or possibly mix and match, if you're bold and have specific needs.

And if ever some new revolutionary GC method is developed, you can just replace your #include. Cutting-edge automatic memory management forever.