Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #24376

Re: Lazy primes with Java 8 (was Re: Java 8 Streams and Eratosthenes)

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news.albasani.net!.POSTED!not-for-mail
From Sebastian <news@seyweiler.dyndns.org>
Newsgroups comp.lang.java.programmer
Subject Re: Lazy primes with Java 8 (was Re: Java 8 Streams and Eratosthenes)
Date Wed, 12 Jun 2013 10:32:26 +0200
Organization albasani.net
Lines 38
Message-ID <kp9bmg$c1e$1@news.albasani.net> (permalink)
References <kolnme$g3e$1@news.albasani.net> <ZYtrt.80089$cD1.53480@newsfe29.iad> <komnrp$3sh$1@news.albasani.net> <komq8g$8hc$1@news.albasani.net> <IpNrt.2$He1.1@newsfe05.iad> <kp331c$n68$1@news.albasani.net> <LY9tt.66779$vh.52483@newsfe20.iad> <kp5382$hqg$1@news.albasani.net> <kp5c15$u7r$1@dont-email.me> <kp84nr$8h7$1@news.albasani.net> <lambda-20130612011115@ram.dialup.fu-berlin.de>
Mime-Version 1.0
Content-Type text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding 8bit
X-Trace news.albasani.net upwGBbStHH3dRgA8tWLzt6WT/bvdI/7W6BXfeLw5C5Qo9DHtchj9vnx92qkZ/TLoelbLLGvAzsD6fqVWunP63w==
NNTP-Posting-Date Wed, 12 Jun 2013 08:32:16 +0000 (UTC)
Injection-Info news.albasani.net; logging-data="0CDU5sPNxeE9IMAk2HWFllKRZJrPwcxpXAvguxJwY+P2ovPB6Xk4qsJYPu6aRqyNjm5krleVtdVqyvu2NMUy/V4Ocm19UJ6fB78rBpHipPTAMj+oVK4DApNLcktsUAPj"; mail-complaints-to="abuse@albasani.net"
User-Agent Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9
In-Reply-To <lambda-20130612011115@ram.dialup.fu-berlin.de>
Cancel-Lock sha1:qSB4O42DyUOuARvlx/17kRKwIE4=
Xref csiph.com comp.lang.java.programmer:24376

Show key headers only | View raw


Am 12.06.2013 01:17, schrieb Stefan Ram:
> Sebastian<news@seyweiler.dyndns.org>  writes:
>> would be Maurice Naftalin's Lambda FAQ at http://www.lambdafaq.org/
>
>    This says:
>
>        »Capture of local variables is restricted to those that
>        are effectively final. Lifting this restriction would
>        present implementation difficulties«.
>
>    Here's another story:
>
>        »Guy Steele wrote:
>
>              Actually, the prototype implementation *did* allow
>              non-final variables to be referenced from within
>              inner classes. There was an outcry from *users*,
>              complaining that they did not want this!«
>
> http://madbean.com/2003/mb2003-49/
>
Brian Goetz gives concurrency issues as the reason in his "official"
State of the lambda, section 7:

"It is our intent to prohibit capture of mutable local variables. The 
reason is that idioms like this:

int sum = 0;
list.forEach(e -> { sum += e.size(); });

are fundamentally serial; it is quite difficult to write lambda bodies 
like this that do not have race conditions. Unless we are willing to 
enforce—preferably at compile time—that such a function cannot escape 
its capturing thread, this feature may well cause more trouble than it 
solves."

http://cr.openjdk.java.net/~briangoetz/lambda/lambda-state-4.html

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Java 8 Streams and Eratosthenes Sebastian <news@seyweiler.dyndns.org> - 2013-06-04 23:54 +0200
  Re: Java 8 Streams and Eratosthenes Arved Sandstrom <asandstrom2@eastlink.ca> - 2013-06-04 19:35 -0300
    Re: Java 8 Streams and Eratosthenes Sebastian <news@seyweiler.dyndns.org> - 2013-06-05 09:03 +0200
      Re: Java 8 Streams and Eratosthenes Sebastian <news@seyweiler.dyndns.org> - 2013-06-05 09:44 +0200
        Re: Java 8 Streams and Eratosthenes Arved Sandstrom <asandstrom2@eastlink.ca> - 2013-06-05 17:43 -0300
          Lazy primes with Java 8 (was Re: Java 8 Streams and Eratosthenes) Sebastian <news@seyweiler.dyndns.org> - 2013-06-10 01:27 +0200
            Re: Lazy primes with Java 8 (was Re: Java 8 Streams and Eratosthenes) Arved Sandstrom <asandstrom2@eastlink.ca> - 2013-06-09 22:28 -0300
              Re: Lazy primes with Java 8 (was Re: Java 8 Streams and Eratosthenes) Sebastian <news@seyweiler.dyndns.org> - 2013-06-10 19:43 +0200
                Re: Lazy primes with Java 8 (was Re: Java 8 Streams and Eratosthenes) markspace <markspace@nospam.nospam> - 2013-06-10 13:18 -0700
                Re: Lazy primes with Java 8 (was Re: Java 8 Streams and Eratosthenes) Sebastian <news@seyweiler.dyndns.org> - 2013-06-11 23:27 +0200
                Re: Lazy primes with Java 8 (was Re: Java 8 Streams and Eratosthenes) Sebastian <news@seyweiler.dyndns.org> - 2013-06-12 10:32 +0200
                Re: Lazy primes with Java 8 (was Re: Java 8 Streams and Eratosthenes) Sebastian <news@seyweiler.dyndns.org> - 2013-06-12 14:37 +0200
                Re: Lazy primes with Java 8 (was Re: Java 8 Streams and Eratosthenes) markspace <markspace@nospam.nospam> - 2013-06-12 12:05 -0700
                Re: Lazy primes with Java 8 (was Re: Java 8 Streams and Eratosthenes) Sebastian <news@seyweiler.dyndns.org> - 2013-06-12 22:53 +0200
                Re: Lazy primes with Java 8 (was Re: Java 8 Streams and Eratosthenes) markspace <markspace@nospam.nospam> - 2013-06-15 15:18 -0700
                Re: Lazy primes with Java 8 (was Re: Java 8 Streams and Eratosthenes) Sebastian <news@seyweiler.dyndns.org> - 2013-06-16 22:52 +0200
                Re: Lazy primes with Java 8 (was Re: Java 8 Streams and Eratosthenes) Arved Sandstrom <asandstrom2@eastlink.ca> - 2013-06-16 21:56 -0300
                Re: Lazy primes with Java 8 (was Re: Java 8 Streams and Eratosthenes) Sebastian <news@seyweiler.dyndns.org> - 2013-06-18 23:18 +0200
  Re: Java 8 Streams and Eratosthenes markspace <markspace@nospam.nospam> - 2013-06-04 17:24 -0700
    Re: Java 8 Streams and Eratosthenes Sebastian <news@seyweiler.dyndns.org> - 2013-06-05 09:09 +0200
      Re: Java 8 Streams and Eratosthenes markspace <markspace@nospam.nospam> - 2013-06-05 09:45 -0700
        Re: Java 8 Streams and Eratosthenes Sebastian <news@seyweiler.dyndns.org> - 2013-06-05 21:32 +0200
    Re: Java 8 Streams and Eratosthenes Sebastian <news@seyweiler.dyndns.org> - 2013-06-05 09:47 +0200

csiph-web