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

"defer" is effectively used for predictable destruction in Go, and a more automated RAII scheme could be used in its place.

C++/CLI is a language that targets a garbage-collected runtime, yet has full-fledged RAII semantics (they're mapped to CLR Dispose pattern).



Oh, I totally forgot about C++/CLI! You're absolutely right; that's my mistake. I do agree that RAII is preferable.




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

Search: