Talk:Closure (computer programming): Difference between revisions

Content deleted Content added
Line 96:
The definition of a closure awafully resembles that of a function object in Java, for instance. Take this:
 
interface Function {
public int map (int y);
}
 
final int step = 2;
new Function () {
public int map (int y) { return y + step; }
}
 
I am not suggesting the example in the article is bad. It shows what is a closure. And I am still waiting to see what is a difference. I can't find this anywhere yet. Finally, a function object is certainly not limited to object-oriented languages. I think it's an old concept originated in functional programming. Maybe I am missing something. -- [[User:TakuyaMurata|Taku]] 11:41, Jun 8, 2005 (UTC)