Fog Creek Software
Discussion Board




Welcome! and rules

Joel on Software

Great explanation of GC decisions

I can't even recall how I came across this, but it relates to why objects in .NET don't feature stack-like deterministic collection.

http://discuss.develop.com/archives/wa.exe?A2=ind0010A&L=DOTNET&P=R28572

Dennis Forbes
Friday, May 13, 2005

Very interesting, thanks. I didn't recognize the name Brian Harry even though I'm subscribed to a bunch of MS blogs. Apparently he's working on Team System and started blogging a year ago but never wrote more than an introductory post.

Link to said post: http://blogs.msdn.com/bharry/default.aspx

Chris Nahr
Saturday, May 14, 2005

If memory serves, Brian Harry came to Microsoft in the acquisition that gave us SourceSafe, so many years ago. I believe he was one of the original engineers on that team.

Brad Wilson [MSFT]
Tuesday, May 17, 2005

By the way, the threads leading up to (and following on from) are what directly led to IDisposable and using. It was ... a very noisy debate. :)

Brad Wilson [MSFT]
Tuesday, May 17, 2005

"We chose not to select a solution that provides deterministic
finalization for a single language/context because it inhibits interop with
other languages and causes bifurcation of class libraries by creating
language specific versions."

Someone clarify for me.. this addresses the RAII suggestion right? That's no good because some languages are semantically incapable if RAII, yes?

BTW, the new C++/CLI actually supports RAII on GC classes. You can instantiate ref classes with value semantics, as locals or as members of other ref classes, and it will automatically call Dispose when it goes out of scope or in the containing class' destructor.

Jedediah
Thursday, May 19, 2005

"Someone clarify for me.. this addresses the RAII suggestion right?"

Yes. RAII is only possible with deterministic destruction.

The new C++ is willing to do this, because C++ is by nature a far more complex language. Unwinding the stack and destroying local object is something that's inherent to C++. It's also what makes exceptions in C++ so costly, so to get, you must be willing to give.

Even so, it certainly seems like C++ 2.0 is killer. :) I wonder if my team will be interested in using it on new projects... ;)

Brad Wilson [MSFT]
Sunday, May 22, 2005

Still very awkward syntax compared to C#, though...

Chris Nahr
Monday, May 23, 2005

*  Recent Topics

*  Fog Creek Home