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 Newsgroups: comp.lang.java.programmer Subject: Re: Java 8 Streams and Eratosthenes Date: Wed, 05 Jun 2013 09:03:29 +0200 Organization: albasani.net Lines: 31 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.albasani.net KURbUPIqf7v4vaNq4uAHGoPwcbap1JBnbR905rpP9rvHuOZsdak20H7vbIMaybk5yn9+AOVbp6Gr1LdFHrTIbg== NNTP-Posting-Date: Wed, 5 Jun 2013 07:03:21 +0000 (UTC) Injection-Info: news.albasani.net; logging-data="tigpfg1zUy9QgqDXiaQNprYk269C29aIC8SiQfWpdq5kR+odleYYeWBwv3JoCjslKoZvk2QuWHQs0aQIuUPsIMq95EwYIzU3Nume7laGUpZv7pxxqeTnSUa2g2jAkAFE"; 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: Cancel-Lock: sha1:MmeM44EA1tSwo5Kl9+9rzk8pxKI= Xref: csiph.com comp.lang.java.programmer:24300 Am 05.06.2013 00:35, schrieb Arved Sandstrom: > On 06/04/2013 06:54 PM, Sebastian wrote: >> Hello there, >> >> I'd like to start an open discussion on issues involving the Streams >> API. As an exercise, I have looked at generating the first n primes, >> for some given n, using the sieve of Eratosthenes. It seemed a >> plausible enough proposition, seeing that the sieve involves repeatedly >> filtering a sequence of integers. >> [snip] >> >> Perhaps the lesson is that some things are best not done using >> streams. [snip] >> >> What are your opinions? >> >> Best, >> Sebastian > [ SNIP ] > > Some things are best not done using Java. Given interop, I'd use Closure > or Scala for this type of stuff, if the main program is still Java. > > AHS That's a bit of a dodge, isn't it? Scala may be a nice language, but that doesn't help with investigating Java's strength and weaknesses. -- Sebastian