I've got some feedback to my recent blogs ... mostly in the form of questions: so here are some (hopefully useful) answers.


Andrew asked about my thoughts on general compiler design. I'd sum it up in one phrase - Keep It Simple - break the compilation process into a series of small discreet steps. Don't have multi-thousand line functions that try to do 50 different tasks. It is much better to have 50 small function each of which does one very specific task. My ideal compiler would be a parser that builds a very rough AST and then runs a multitude of visitors over the tree gradually checking for errors and converting the tree to the final fully resolved form.

Of course the one “problem” with this mult-pass approach is performance: you may end up with an extremely robust, correct, easily maintainable compiler but if it takes 30 minutes to compile Hello World then no one will use it. So as with lots of software problems there is a trade-off here: in this case it is the number of passes vs the complexity of each pass. But as the very least you should never have one pass that tries to do two tasks that have a strong chance of interfering with each other.


Matt and Phil asked what source code control system we use. We don't use Visual SourceSafe: though some teams at Microsoft do use it - I know that the MFC/ATL guys used it for quite a while and were very happy with it. A couple of years ago it was decided that Visual Studio should follow the NT model and create a unified source repository for all the source code that made up the product (up until this point each sub-team had looked after its own source code) - given that this includes 10'000s of files and millions of lines of code VSS was not really up to the task. So we use a source code control system called Source Depot.

Korby Parnell from the VSS team has a great blog http://weblogs.asp.net/korbyp in which he covers source code control issues.