Most of the commentors on my destructors and finalizers post figured out the reason why we went with the destructor syntax – so that we could ensure that the base class destructor gets called. A few comments on the comments:
Jeroen Frijters has some comments on what’s wrong with C# finalization. It is true that there isn’t a guarantee across other languages that the right thing will happen here – this area and the whole Dispose() area are ones where it would have been nice to come up with a cleaner way to support these comments.
Finally, a comment on choosing the destructor syntax. It is true that we’re overloading the destructor syntax to mean something different (to some, subtly different) from what it means in C++. We did the same thing with the “new“ keyword – it means something different in C# than it does in C++.
I think we made reasonable decisions there. One could choose to make the opposite choice, but that would require you to come up with new keywords, which is a surprisingly hard thing to do (feel free to engage in discussion on what those should be in the comments).
Another question for the comments. Do you like the “why does C# do this?” format, or would you prefer me just to tell you why we do something?