A place to keep my thoughts on programming

Tag Archives: closure

When lazy evaluation attacks

I just had a lovely object lesson in lazy evaluation of Iterators. I wanted to have method that would return an enumerator over an encapsulated set after doing some sanity checking: public IEnumerable<Subscription> Filter(Func<Subscription, bool> filter) { if(filter == null) … Continue reading

May 17, 2011 geek , , ,

Promise: Lambdas

Lambdas in Promise, like other languages, are anonymous functions and first-class values. They act as closures over the scope they are defined in and can capture the free variables in their current lexical scope. Promise uses lambdas for all function … Continue reading

July 11, 2010 .net, geek, Promise , , , , ,

Are delegates the reason we have C#?

This may be ancient news, but I just came across an article that strongly implied that the reason .NET came about was because Sun didn’t like Microsoft’s addition of delegates to J++. That surely is a condensation of events, but … Continue reading

April 9, 2007 .net, geek , , , , ,

C# closures

Just after starting to play with closures in javascript (to fake delegates), i run across an excellent series of articles on closures and anonymous functions in C# 2.0, complete with pitfalls. Cool stuff… The implementation of anonymous methods in C# … Continue reading

August 5, 2006 .net ,