Accessing non-final local variables from a lambda expression

Paulo Levi i30817 at gmail.com
Sun Feb 28 11:57:32 PST 2010


Besides would that catch the case when a pure function is turned into a
"impure" function?

Say

@Pure public int add(int x){
return 2+x;
}
....
parallelMap(list, #add(int i));


later in refactoring:
@Pure public c = 2;
public int add(int x){
return c+x;
}
Can annotations hijack the type system to this level?


More information about the lambda-dev mailing list