Final finality

Lots of good comments were made about my last post. Just wanted to add my own thoughts (its my blog after all!). The example is inane and trivial, and yes it could be refactored in many other ways. The point is, if you have something that must always occur just before the execution thread leaves a block of code, a finally block is the way to go. Its also interesting that while the try/catch/finally form is well known, try/finally is much less frequently seen.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s