Kit George - Tour of .NET CLR Base Class Library Team (Part II)

preview
Posted by The Channel 9 Team // Sun, Aug 21, 2005 4:25 PM

In this part, you'll jump right into a meeting with Brad Abrams and Joe Duffy. You can see how they think through an issue with the .NET CLR's design.

Tags:

Video Length: 00:29:09 Replies: 10 // Views: 20,960
  John Melville, MD
  Equality Through Technology
 
  Mon, Jan 17 2005 8:54 PM
Nice Job:

I like this "tour" format.  Have a informative discussion with 3-4 people rather than just bumping into 10+.

  Flatliner
  With our thoughts we make the world.
 
  Mon, Jan 17 2005 9:55 PM

With the Dispose problem: I say make the Dipose() public or protected. This is functionality that should always be exposed, if not to all classes, at least those that inherit from an IDisposable object.
The confusion (if any) caused between Close() and Dispose() is negligible in in my opinion, and is an issue that can (and usually is) resolved with good documentation addressing the possible confusion.  There is definitely a conceptual difference between the two methods (even if there is no difference in its implementation)



  joedu
 
 
  Mon, Jan 17 2005 11:19 PM
Fyi, a bit more reading on the whole disposable topic is available on my blog:
http://www.bluebytesoftware.com/blog/PermaLink.aspx?guid=1fe0f820-5b2b-4b17-82af-08142e7f308a

Feedback, questions, comments, etc. are welcome.

  Minh
  Does this make my head look fat?
 
  Tue, Jan 18 2005 3:11 AM
Oh, come on, release that test tool. We'll take it support-free. I'll click all the "I Agree" you have.


  bdelahunty
 
 
  Tue, Jan 18 2005 10:44 AM
Cool video. And release the tool! Who cares about support issues!


  nemisys
  You Know
 
  Tue, Jan 18 2005 12:52 PM
http://www.mirrordot.org/stories/b45b564dd93222faa7fc0335836835d1/index.html

I'll bet he is hacking that Mac in the background. His XT computer doesn't have the GUI yet.....YET!


  littleguru
  Kameo, I'm coming...
 
  Tue, Jan 18 2005 4:15 PM
joedu wrote:
Fyi, a bit more reading on the whole disposable topic is available on my blog:
http://www.bluebytesoftware.com/blog/PermaLink.aspx?guid=1fe0f820-5b2b-4b17-82af-08142e7f308a

Feedback, questions, comments, etc. are welcome.


Hi Joedu! I hope you are not changing the behaviour of the interfaces!!

I mean if I implement for example IList and IList<T>, but I want to show the user only the IList<T> implementation. I'm hiding IList by implementing it implicitly (i guess this was the right term - I'm always confusing them). If somebody wants the implementation of IList the cast to IList must be done. It should be done this way and nothing should be changed.

Are you going to change this behaviour? Are all members of IList and IList<T> then accessible without cast (even the one from IList)?

  joedu
 
 
  Tue, Jan 18 2005 4:23 PM

Littleguru: No, that's not what I was suggesting, although with the minimal amount of explanation I did in the video, I can see how one would get that impression. :)

The primary problem is that there's no way to call this from a base class. If it weren't explicitly implemented, you could easily just do:

base.Dispose();

But because explicit implementations are emitted as private by the C# compiler (which the team firmly believes is the correct design), this isn't possible. You can't even do it in IL. One could imagine new C# syntax that made this possible:

((IDisposable)base).Dispose();

But this would only be possible with either
a) Explicitly implemented methods being emitted as family; or,
b) A "basecall" IL instruction.

We're going to look at these in future releases, but we dropped the idea for Whidbey.



  littleguru
  Kameo, I'm coming...
 
  Tue, Jan 18 2005 4:59 PM

Ok *wipe sweat* :)

Yes the explaination in the video was very short, that's true. I didn't even know that this


((IDisposable)base).Dispose();

doesn't work. I had to test it and the C# compiler in Whidbey gave an error. It's actually a quite strange behaviour, since you can call the method from outside... as you said in the video.

Hopefully you are finding a good solution for it. The "basecall" IL instruction does not sound bad.

Cheers



  mVPstar
  Out of reality
 
  Tue, Jan 18 2005 10:13 PM

Darn it, I want that Microsoft Cup. :)

Hey, if I send you guys a postcard, do you think I can have the C9 guy AND a cup? :D


As for the video, I really appreciate that you guys are letting us in on this kind of stuff.  C9 should have their own actual television station that just showcasing all this kind of stuff.

It would be on...Channel 9! :P