After about seven months of hacking, I'm finally done with C# generics :-)
This means, we've finally reached the point where people can start actually using generis in their code. The new compiler may not be perfect yet, but the more people are trying it, the faster it can sort out the remaining bugs. At this point, the most important thing left to do is having people use and test it and file bug reports.
However, I'm currently really happy with it. It took at lot longer than I originally expected, but I tried to follow the spec really closely and also reporting all the required errors, so that's one of the reasons why it took so long.
Well, first all all, you need to compile and install the new generics compiler, gmcs. Even though I started in late August last year, gmcs still has all the latest bug fixes and improvements which went into the normal compiler since I'm merging the two code bases on a regular basis.
Before you can compile gmcs, you need to get a corlib which has all the latest features from the upcoming .NET 1.2. To do this, compile your corlib using the net_1_2 profile by saying make PROFILE=net_1_2. This'll get you a corlib which has some additional things in reflection, but which doesn't come with generics yet (because you don't have a generics compiler yet).
After installing this new corlib, you can simply type make in the mcs/gmcs directory to get the new compiler. gmcs is self-hosting, but we're currently compiling it with mcs to avoid the obvious chicken-egg problem - nobody has a gmcs.exe binary until compiling it the first time.
Once you have gmcs, you can finally compile your real corlib. This is done using the martin-generics profile (it'll soon be renamed to generics) - by saying make PROFILE=martin-generics (you may need to do a make clean first).
This new corlib also contains the System.Collections.Generic classes. Once you compiled it, you don't need to do the net_1_2 step anymore if you want to recompile gmcs - and you could also use gmcs itself to recompile it.
There is a bunch of tests for generics in the mcs/tests directory - they're all called gen-*.cs and there's a gen-test.pl script in that directory to run them.
Error tests are in mcs/errors/gcs*.cs and are run by the run-generics-local target in the makefile.
I'm very interested in getting feedback, bug reports and more test cases. Just mail me if you have any questions or problems. New tests cases and error test cases can just go into CVS, put please do also file a bug report in bugzilla if you add them, so I know what needs to be fixed.
Depite all this enthusiasm about having a generics compiler, mcs is still the compiler which'll ship with Mono 1.0 and it'll get all the bug-fixing and improvements and I'll merge them into gmcs on a regular basis. It is very important to keep the differences between the two code bases to an absolute minimum, so gmcs is basically just mcs with generics support - but it has everything else mcs has.
To summarize, I think gmcs is in a pretty good shape at the moment. Of course, there may be bugs - but every new software has bugs when it's newly written. One other thing to mention is that performance may not be as good as in the non-generic compiler. But that's because on the one hand I targeted entirely on completeness and robustness and didn't care about performance and on the other hand, people like Ben have done an increadible work on improving performance in the non-generic compiler during the last couple of weeks. So it's basically just a matter of time until gmcs catches up ....
For those of you who're wondering what I'm doing next - well, I'm helping with the ppc port. After doing basically nothing but generics for several months, I'm really looking forward to doing something else, learning another architecture and seriously kicking ass on the ppc :-)
After ppc is done, I'll go back to generics, do some fine-tuning, performance optimizations and bugfixing.
However, at the moment, I'm starting to feel the power of the ppc - and it's time to go to Bukowski's :-)