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

Circular references and other things that tend to leak memory on GC languages aren't a logic flaw in the sense of your business logic being wrong or your algorithms being bad, though. They're things the language allows you to do, that can be completely correct at a business level and visually correct at a code level, but result in fundamental breakage of the VM's operation.

I say this as someone who does high-level languages as a day job, and doesn't find them to be a problem personally, but, yeah, Java as a concept still allows some unintuitive footguns like that.

Difference in magnitude of impact, difference in the response of the standards organizations in handling it, but yeah it's certainly same kind of footgun as C lets you do. The difference being that Java has devoted an enormous amount of resources to squashing these errors and they largely aren't a problem anymore, where C is afraid to touch the "undefined behavior" and "implementation dependent" sacred cows.

Is there an unspoken social contract between language committee and language users that aliasing a variable or causing a circular reference should not shoot your dog and burn down the house? That's the fundamental disagreement between Java and C's standards bodies.




Circular reference does not leak memory if your using a proper GC




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: