groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Russel Winder <rus...@winder.org.uk>
Subject GPars 2 Stuff
Date Wed, 03 Jan 2018 18:50:49 GMT
In GPars 1.X it was possible to do things such as:

    [1, 2, 3, 4, 5].parallel.reduce{a, b -> Math.min(a, b)}

Without GPars it is possible using Groovy to achieve the exact same
functionality on JDK8+ with:

    [1, 2, 3, 4, 5].parallelStream().reduce{a, b -> Math.min(a, b)}.get()

The question is therefore whether to remove the GPars 1.X behaviour
from GPars 2.X since the functionality is available using nigh on the
same just using JDK8+ features, or to mock it up using the JDK8+
features.

Personally I am all for removing the GPars 1.X stuff from GPars 2.X,
Ockham's Razor etc., so this will be the default action unless people
get vocal and contribute. 

-- 
Russel.
==========================================
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

Mime
View raw message