Browse by Tags

Tagged Content List
  • Blog Post: Closing over the loop variable, part two

    (This is part two of a two-part series on the loop-variable-closure problem. Part one is here .) UPDATE : We are taking the breaking change. In C# 5, the loop variable of a foreach will be logically inside the loop, and therefore closures will close over a fresh copy of the variable each time . The ...
  • Blog Post: Closing over the loop variable considered harmful

    (This is part one of a two-part series on the loop-variable-closure problem. Part two is here .) UPDATE : We are taking the breaking change. In C# 5, the loop variable of a foreach will be logically inside the loop, and therefore closures will close over a fresh copy of the variable each time . The ...
  • Blog Post: What are closures?

    JScript, as I noted yesterday, is a functional language . That doesn't mean that it works particularly well (though I hope it does) but rather that it treats functions as first-class objects. Functions can be passed around and assigned to variables just as strings or integers can be. A reader commented...
Page 1 of 1 (3 items)