Friday, May 22, 2009

Lambda Expressions - Hoisting

Just musing over the concept of lambda expressions, AKA. anonymous methods. If what I understand is correct, the entire method of hoisting involves a simple analysis of the scopes involved within the hoist. You'd merely have to create a scope dependency chain within each scope. If a scope depends on another scope, you evaluate the associated variables, and move them forward. This process would be nested, and if a sub-scope depended upon a scope two levels higher, the parent scope would also depend upon its parent's scope, albeit indirectly. The scopes, in essence would reference one another as instances of the classes that represent each individual scope.

I'll post more once I've got a working implementation within the code generation framework.

No comments: