3 ms·
Back when Java didn't have lambdas, one of the more advanced lambda proposals (http://www.javac.info/closures-v06a.html http://www.javac.info/closures-v06a.html
by int_19h 2y ago
Back when Java didn't have lambdas, one of the more advanced lambda proposals (http://www.javac.info/closures-v06a.html http://www.javac.info/closures-v06a.html) had this exact thing for this exact reason.
Unfortunately, this take on lambdas was deemed too complicated, and so we got the present system which doesn't really try to deal with this use case at all.