Robert McLaws: FunWithCoding.NET

Public Shared Function BrainDump(ByVal dotNet As String) As [Value]

News

<script type="text/javascript"><!-- google_ad_client = "pub-4330602465258980"; google_hints = "ASP.NET, VB.NET, C#, C#.NET, WindowsForms, .NET Framework, VS2005, Visual Studio, XAML, WinFX, Windows Workflow, WPF, WCF, Atlas, NetFX3, Visual Studio Orcas"; google_ad_width = 120; google_ad_height = 240; google_ad_format = "120x240_as"; google_ad_type = "text_image"; google_ad_channel ="4997399242"; google_color_border = "B6C9E7"; google_color_bg = "EFEFEF"; google_color_link = "0000FF"; google_color_text = "000000"; google_color_url = "002C99"; //--></script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script>
<!--
-->

You should feel free to challenge me, disagree with me, or tell me I'm completely nuts in the comments section of each blog entry, but I reserve the right to delete any comment for any reason whatsoever. That said, I will most likely only delete abusive, profane, rude, or annonymous comments, so keep it polite, please.

Blogroll

Cool .NET Articles

My .NET Tools

My Builder.com Articles

My MSKB Articles

Inconsistencies in .NET 2.0 (Build 40301)

So over the past 48 hours, I've been really diving into the Framework 2.0, looking at how the Provider Model is architected and implemented. There is one point that kind of confuses me, and I'm hoping that since there are so many Microsoft voices here, someone can give me an answer.

I expected that a lot of the new code would be using Generics instead of Collections, because I thought that collection programming was one of the primary reasons for using Generics. Is this not the case? Just out of curiosity, why are there still so many parts of 2.0 that are not using Generics?

Also, I was snooping around, and there are still several places in the Framework that are not using the new TryCast keyword. They are still doing redundant type-checking before casting objects, i.e:

1Dim MyOtherObject as SomeBaseType

2If TypeOf o Is SomeDerivedType
3 MyOtherObject = DirectCast(o, SomeDerivedType)
4 If Not MyOtherObject Is Nothing Then
5 'Do Something
6 Else
7 Throw New YouScrewedUpException("You call yourself a programmer?")
8 End If
9End If
(I think that code is right). Anyways, it was just confusing for me. I would be curious to know what kind of communication there is between teams on what new features are going to be in the Framework, and how API design is standardized across the project. Is standardization a part of the stabilization and performance phases of the MSF model? If so, is there one final scrub of all the APIs before release?

Comments

kpako@yahoo.com (Dare Obasanjo) said:

When last I checked there were guidelines that any API that used generics should also provide non-generic versions of the method so it could be used from languages that didn't support generics. I don't know if this policy has changed but I didn't see the point of doubling my API surface area for what is effectively syntactic sugar so I didn't use generics in any of the APIs I was designing for Whidbey.

I have no idea about about other teams in Whidbey.
# April 21, 2004 9:04 PM

Julien Ellie said:

Yes, it's very simple, generics are not yet CLS compliant, so no API will expose generics until that's the case.
# April 21, 2004 9:48 PM

Paul Vick said:

One thing I would add is that there's also a question of ordering that frequently enters into this equasion. When a feature like TryCast gets checked in, it can take a while before tools that support it get accepted to be used to build the frameworks. We also miss things sometimes, too, so feel free to point out places where it looks like we could do things better!
# April 23, 2004 6:21 PM