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

This is Go, yet add again, catching up to the lessons learned by the other programming language communities.

As you point out, finalizers are no longer in good grace in Java, not even in .NET, but lets leave that for another thread.

Hence why they are deprecated since Java 9, released in 2017, and a Cleaner queue should be used instead, or try-with-resources.

https://docs.oracle.com/javase/9/docs/api/java/lang/Object.h...

Basically runtime.AddCleanup() is the Go's version of java.lang.ref.Cleaner::register().



It would be better if they didn't learn from the others


Can you explain? Because if you don't learn from others you're cursed to repeat the same mistakes. I like to mention Java's generics implementation making up half the language spec and compiler.


"We're special. Hmm, okay that didn't work". Every Go feature.




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: