Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Daniele Futtorovic Newsgroups: comp.lang.java.programmer Subject: Re: new Java lambda syntax Date: Tue, 13 Sep 2011 02:00:00 +0200 Organization: A noiseless patient Spider Lines: 17 Message-ID: References: <9j3vj8-aqe.ln1@news.simpsonst.f2s.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Injection-Date: Tue, 13 Sep 2011 00:05:20 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="qpukswBZyYjgONqL/zBjJg"; logging-data="29897"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1++DjBT5d3g0yc5iyDmbF7v" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.2.22) Gecko/20110902 Thunderbird/3.1.14 In-Reply-To: Cancel-Lock: sha1:p6V4gZvqTqhjb57rmSWTdgGtkhw= Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:7932 On 12/09/2011 00:07, Joshua Cranmer allegedly wrote: > > List runners = new LinkedList(); > for (int i = 0; i < 10; i++) { > runners.add(() => { System.out.println("Value of i is " + i); }); > } > for (Runnable r : runners) { > r.run(); > } Beg your pardon, I haven't followed this issue as closely as I probably have should, but does this all mean lambdas are always Runnables? Never Callables? IOW, no return values? -- DF. Determinism trumps correctness.