Friday, November 17, 2006

Eric Lippert, C# 3.0 Type Inference, Charlie Calvert & Turbo Pascal

Some great details in a video linked from Eric Lippert's blog.

There's a lot of detail on the new algorithm for type inference in C#. It all looks increasingly hard to parse without build a whole tree without typing for the expression containing the LINQ query, and because lambdas can contain statements, that implies a whole tree for statements too. In other words, a compiler implementing this functionality wouldn't always be able to annotate expression types as it parses - it'll need another descent / transform through the parse tree.

Also interesting, for me at least, is the Turbo Pascal box in the background on Charlie's shelf, about 25 minutes in - given that I'm now helping maintain the Delphi compiler, the descendant of that product.