Effectively final effective?
John Nilsson
john at milsson.nu
Sat Feb 27 16:32:04 PST 2010
On Sun, Feb 28, 2010 at 1:10 AM, Reinier Zwitserloot <
reinier at zwitserloot.com> wrote:
> So what? I already showed that those people who are confused about my model
> will see the error of their ways in 2 seconds. The people who are confused
> about your model, even if there are only a tenth of them (I highly doubt
> this), need an hour. 60 minutes is a lot more than 2 seconds * 10.
>
Looking back at the discussion I realize a mistake on my part. When arguing
against my suggestions I assumed you argued for the print 222 variant. I now
realize that you actually prefer a compiler error.
Given the four suggestions I would say that it is more important to avoid
the 222 variant then it is to support the 123 variant I was arguing for.
With reference to the same argument you made: it leads to surprising
results. So if the option is to throw a compiler error at the developer and
force them to write an explicit workaround, I guess I actually agree.
So then the discussion is rather about what compiler error it is that forces
you to write
for(int i = 0; i < 3; i++)
{
final int currI = i;
funs.add(()->currI)
}
?
BR,
John
More information about the lambda-dev
mailing list