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

finally { } doesn't really do the job. You have to write it all the damn time! Bad developers keep making mistakes writing try { } finally { } blocks. Some have absurd religions about where and how things should be initialized. In C#, IEnumerator<T> : IDisposable, which means you can iterate over resources using foreach loops. try { } finally { } blocks have a higher mental cost of -- they push more things out of short-term memory. finally { } does the job of being evaluated when exiting the block just fine, but that's all.



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

Search: