Hacker News new | past | comments | ask | show | jobs | submit login

> The whole point of GC is to create a situation where you don't have to think about allocations!

Nope. The point of GC is memory safety.

GC also means you don't have to think about freeing memory, which is important in concurrent systems.

But even if GC was about "not thinking about allocations", what's bad about only having to think about allocations when it's important? Code clarity trumps performance, except at bottlenecks.




Well, you're being a bit revisionist.

You can get memory safety without GC, and a number of GC'd systems do not provide memory safety.

If you think that, for concurrent systems, it is a good idea to let deallocations pile up until some future time at which a lot of work has to be done to rediscover them, and during this discovery process ALL THREADS ARE FROZEN, then you have a different definition of concurrency than I do. Or something.

If you want to know about code clarity, then understanding what your program does with memory, and expressing that clearly in code rather than trying to sweep it under the rug, is really good for clarity. Try it sometime.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: