technology

General Theory of Resources

In the process of researching about IDisposable, I found a lot of illuminating discussions on Stack Overflow. It became apparent that there were a few regular players who had intelligent things to say on the topic, and I would follow their links and profiles to find more intelligent things they had to say on other topics.

One of these players is Daniel Eerwicker, who created a “General Theory Of Resources” in a blog post that I feel obligated to describe as epic. It piqued my interest, since this was exactly an area I had questions about. He describes the cultural problem with the IDisposable pattern:

But these mere technical problems are minor compared with the cultural problem that exists around this technique. These are caused by copious amounts of official or semi-official documentation which confuse it with finalizers, in apparent denial of their different areas of applicability.

I was confused by the documentation he is talking about:) At the end, he proposes his own alternative to Microsoft’s IDisposable pattern that he calls “Gateways.” It’s a long article, but very interesting.

Advertisements
Standard

One thought on “General Theory of Resources

Leave a Reply

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

WordPress.com Logo

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

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s