Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Also Java lambdas can't change outer variables, so one have to resort to old tricks with one-item arrays.

On the rare occasion that I need to do this, I usually find that I'm thinking about the problem the wrong way and there's a much clearer way to write it than messing with mutable variables outside my closures.



Tend to so but it depends on situation.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: