Anonymous Methods

by Miguel de Icaza

Been doing good progress with anonymous methods, but last night on the plane on the way back home, I discovered a big problem with my design (I had a fairly clever way of computing the right return type in an anonymous method).

My clever hack was to hook up to the standard conversion code: anonymous methods are generated during the implicit conversion code. The problem with this approach is that it was too late to capture variables.

Am right now toying with overloading the implementation of Field expressions and LocalVariableReference expressions to handle the lifting, rather than the clever CapturedVariable expression which I was using before.

Marek and CLS compliance

Marek has been cleaning up the compiler internals to turn our compiler into a CLS-aware compiler, now we will be able to flag CLS violation errors. His fixes includes long-standing wishlist items to refactor the interface members to become regular MemberCores (which they do now) and refactoring some of the attribute emission and gratuitous differences in constants and fields that we had in the code.

Posted on 11 Feb 2004