From users-return-3123-archive-asf-public=cust-asf.ponee.io@groovy.apache.org Mon Jan 8 11:30:32 2018 Return-Path: X-Original-To: archive-asf-public@eu.ponee.io Delivered-To: archive-asf-public@eu.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by mx-eu-01.ponee.io (Postfix) with ESMTP id 93375180607 for ; Mon, 8 Jan 2018 11:30:32 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 83429160C1E; Mon, 8 Jan 2018 10:30:32 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id C7082160C2C for ; Mon, 8 Jan 2018 11:30:31 +0100 (CET) Received: (qmail 14646 invoked by uid 500); 8 Jan 2018 10:30:30 -0000 Mailing-List: contact users-help@groovy.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@groovy.apache.org Delivered-To: mailing list users@groovy.apache.org Received: (qmail 14636 invoked by uid 99); 8 Jan 2018 10:30:30 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Jan 2018 10:30:30 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 3DC26C3362 for ; Mon, 8 Jan 2018 10:30:30 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.011 X-Spam-Level: X-Spam-Status: No, score=-0.011 tagged_above=-999 required=6.31 tests=[SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id bTLoYRUKj-_U for ; Mon, 8 Jan 2018 10:30:27 +0000 (UTC) Received: from dimen.winder.org.uk (dimen.winder.org.uk [87.127.116.10]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 04DED5FB71 for ; Mon, 8 Jan 2018 10:30:27 +0000 (UTC) Received: from anglides.winder.org.uk (anglides.winder.org.uk [192.168.1.8]) by dimen.winder.org.uk (Postfix) with ESMTPSA id B202E600158; Mon, 8 Jan 2018 10:30:26 +0000 (GMT) Message-ID: <1515407426.11010.22.camel@winder.org.uk> Subject: Re: GPars 2 Stuff From: Russel Winder To: users@groovy.apache.org Cc: GPars Users Date: Mon, 08 Jan 2018 10:30:26 +0000 In-Reply-To: References: <1515005449.21831.38.camel@winder.org.uk> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-TU5ElP0wGEwGCYRb5JgG" X-Mailer: Evolution 3.26.3-1 Mime-Version: 1.0 --=-TU5ElP0wGEwGCYRb5JgG Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, 2018-01-08 at 08:21 +0530, Balachandran Sivakumar wrote: > Hi Dr. Russel, >=20 > On Thu, Jan 4, 2018 at 12:20 AM, Russel Winder wro= te: > > In GPars 1.X it was possible to do things such as: > >=20 > > [1, 2, 3, 4, 5].parallel.reduce{a, b -> Math.min(a, b)} > >=20 > > Without GPars it is possible using Groovy to achieve the exact same > > functionality on JDK8+ with: > >=20 > > [1, 2, 3, 4, 5].parallelStream().reduce{a, b -> Math.min(a, b)}.get= () > >=20 >=20 > The GPars way is a lot more terse and more "functional" than the > JDK8+ way. As a user, we don't have to know whether the underlying > stuff is a parallelStream or ParallelArray(like it is in GPars 1.x). > So, I would prefer to retain the API, but base it over streams instead > of ParallelArrays. Thanks I guess it depends on the definition of "functional": in the sense "functio= nal programming", no Streams and the use of Optional is correct; in the sense o= f "works for me" I guess it is personal choice! --=20 Russel. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Dr Russel Winder t: +44 20 7585 2200 41 Buckmaster Road m: +44 7770 465 077 London SW11 1EN, UK w: www.russel.org.uk --=-TU5ElP0wGEwGCYRb5JgG Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEETwDs1X+Beyaiaer41L3V0s7Np7gFAlpTSEIACgkQ1L3V0s7N p7iIdw/7B0BkXMXfvOz/fyi2yHc7EpmKLQOBnnOy4BxqDjf2HKomirq80I7qN727 dz+dfPKe2WwucIzXCRVSoeztqZUt22O2yCzN00R0ZmyM/FdTLGk23pYb6cFEiMzY hHd718BNh+M1nQQXCLiIPKJmT2T+oZBmhW88ZjbZjUV5khLaprO0b4lrM7ECcTEa WVuKmMPdK96G4AaEErGBzKrzT9QpfbyNn5l+cjHE4AjDHeW8jb4kp0u5PQ0RwpjD fK0dE86P4S/9c8ekp8H3a36iAPhVUpwYxt7asSHkBAUF/4krJ8mKImxoUOBHc8mS AUEshpmQN6vFApCI8avgRl8FrNnrY7y0MbNZiDzi/6Yh+n7l29R0ilJAMc4mG/a2 iLZJaylWAd0gNGFQa8kJrP8z/W/Bwf4KMRKQE1BDh3Vr7UDTnr+aX74w5i2+pSF4 FQyWsuQLcl/PkfzGCT2gP2AyHDWKuTHdSHR5bXm+N5VbREHh+/CBggFHKTneHAja fjWwDRLGY6O2lirYV+eZh0rvrJwW2wKPhg2D/srQBH0Z4wrHX7leZAQcWXSorndd XDOEuu79ssXSYVUeDQCMRDV5Wi02W4HpJqHqwUW9gXngJbn88HG3mN+TT4WBHKiM 8vRuo1ujNmQt633tESlmUF8RSCHv1ra/iQsZE2l9RGg2VYte6hE= =RPYM -----END PGP SIGNATURE----- --=-TU5ElP0wGEwGCYRb5JgG--