C# Generics and Backwards Compatibility

A friend of mine, who makes l337 lil' products for a crypto shop, recently asked me about the plans for backwards compatibility support in .NET Framework APIs like System.Collections. He was particularly wondering if old code that used classes like ArrayList or Hashtable would need to be rewritten to make use of generics.

So the public story seems to be that there will be a generic collections package whose classes will implement the interfaces from the .NET Framework 1.0 System.Collections framework meaning that code that accepted or returned objects that implemented these interfaces will support generics with no change when the time comes.

Yup, we are all about backwards compatibility and it can be such a pain sometimes. :)


Why Use XML?

The more I use XML and participate in discussions about using XML the more I've wondered why people use it. This morning while making breakfast I decided to write down the top 3 reasons I've seen for people using XML with some thoughts about each
  1. Everyone Else Is Using It: This is usually the most common reason. Sometimes this is due to positive peer pressue, for example if everyone in your industry is using XML then you will as well. For instance I use RSS , an XML format, to syndicate my K5 diary because that's what other webloggers do as well. Doing this means it is easy for others to read or mechanically process my RSS feed because it uses one standardized by the community. On the other hand, there is the negative aspect of this where people use XML simply to be buzzword compliant. Almost everytime I hear the phrase binary XML I always wonder why the speaker is even bothering to [mis]use XML at all.

  2. Huge Selection of Off-The-Shelf Tools: One thing about using XML is that there are a number of technologies for working with it from APIs for parsing and querying to transformation and schema languages. This is a great benefit but has nothing to do with XML as a technology and everything to with the fact that the software industry decided to come together and support the technology as opposed to being our usual bickering selves. Too bad we couldn't come together like this around S-expressions. :)

  3. Separation of Content from Presentation: Being able to store your files in a single format which can then be converted to various presentation formats as needed be they HTML, PDF, PostScript, etc is very enticing for content creators. I for one like the fact that XMLDB SiXDML site and the 25HoursADay.com SiXDML site are generated from the same file. Storage and querying is also simpler when content is disconnected from presentation. Of course, some may describe this use case as a subset of (2) above and they're probably right.
Given the three use cases described above, can anyone tell me why XHTML is not a dumb idea. Bonus points for looking at the Why XHTML section of the W3C recommendation and explaining how XHTML solves those problems in a way HTML does not.


Get yourself a News Aggregator and subscribe to my RSSfeed


The opinions in this diary are my own and do not reflect the opinions, thoughts, intentions or strategies of my employer.


Comments are closed.