Why Doesn't .NET Support Deterministic Finalization?

Why Doesn't .NET Support Deterministic Finalization?

This email from Brian Harry has been making the rounds again lately. It's a pretty in depth talk about the reasons why .NET doesn't support deterministic finalization, including the history behind it. I found it a pretty interesting read. The mail's a bit old though, from October 2000, so he's talking about beta bits of the v1.0 framework. What I found pretty funny was his talk about the using / IDisposable features of C# in the future tense:

“PROPOSAL - There is a proposal here to add syntax that would make this looklike the following. The compiler would effectively expand this code to tothe code above. Please understand that by telling you we are consideringthis, I am making no commitment and this is not a spec. The IDisposableinterface I mentioned earlier would help the compiler disambiguate themethod to call at the end of the scope. I would like to get your feedbackon the idea however. Obviously there are subtle variations on the syntaxyou can invent. We believe that this makes the very common design patternquite a bit more palatable.foo(){ using (File f = new File("c:\tmp")) { byte[] b = f.Read(); }}”

And then his thought that this feature probably won't make the cut:

“We are closest to the border on [using] but I'd say we are slightly disinclinedto do it, again because it is really not more than syntactic sugar and weare prioritizing shipping very high.”

It's always fun to look back on old mail about design decisions that are being made and compare that to the current state of the project. Leads to lots of “wow, we were considering that?” moments :-)