Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: Steven Simpson Newsgroups: comp.lang.java.programmer Subject: Re: Why is that in JDK8: value used in lambda expression shuld be effectively final? Date: Fri, 04 Jan 2013 21:32:38 +0000 Organization: A noiseless patient Spider Lines: 14 Message-ID: References: <9f030e71-96ab-4ead-9690-4369f4a19aa9@googlegroups.com> <0680c1e0-16cb-4791-8a5f-95a3ff2bcba8@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: mx04.eternal-september.org; posting-host="0d771e3708e29ef01409ed69429633ae"; logging-data="2947"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/kdMCRLIb8TUvy7vYWoDnwSCnBQhTpoPk=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 In-Reply-To: Cancel-Lock: sha1:OhkXZDTNkswyYFzw/ty/jtoo3fg= Xref: csiph.com comp.lang.java.programmer:20955 On 03/01/13 14:45, Saxo wrote: > http://objectscape.blogspot.de/2013/01/jdk8-lambdas-as-restrictive-as.html I'm still interested in seeing an example that you would normally write with free variables, demonstrating that lambdas are inadequate for the things you'd like to do. The example you provided of summing integers has two alternatives, so it only serves to show that free variables are not possible, not that free variables are necessary. Can you contrive something more sophisticated, as an exercise? -- ss at comp dot lancs dot ac dot uk