Call for Discussion: Project proposal: Greenfields

Peter Lawrey peter.lawrey at gmail.com
Fri Apr 1 06:45:44 UTC 2022


A timely point, just yesterday I wrote

try (Closeable close = null) {
}

As a work around I suggest

/* try */ {
}

On Fri, 1 Apr 2022, 07:14 Remi Forax, <forax at univ-mlv.fr> wrote:

> ----- Original Message -----
> > From: "Magnus Ihse Bursie" <magnus.ihse.bursie at oracle.com>
> > To: "discuss" <discuss at openjdk.java.net>
> > Sent: Friday, April 1, 2022 7:51:44 AM
> > Subject: Call for Discussion: Project proposal: Greenfields
>
> > With Project Loom[1] getting closer to delivery, we will soon have a
> > world where even simple Java programs might use millions of threads.
> > This will, in effect, mean a world-wide multiplication on the number of
> > threads in Java programs by several magnitudes! This might seem like a
> > fantastic win for the Java eco-system, but we are forgetting the effects
> > on the real eco-system.
> >
> > As you might or might not be aware of, the textile industry is one of
> > the heaviest polluter in the world[2]. Adding billions upon billions of
> > new threads to this world seem like environmental arrogance.
> >
> > I therefore propose we start Project Greenfield, which will research the
> > reintroduction of Green Threads, and study how much pesticide and
> > fertilizer use will rise due to Project Loom. Project Greenfields will
> > also develop prototypes to lower pesticide, fertilizer, and water use
> > for Java programs that need to create millions of threads.
> >
> > Project Greenfields will deliver its first prototype in exactly one
> > years time, April 1, 2023. If this is successful, we can retarget the
> > project for the upcoming year, to look at the CO2 cost associated with
> > Java bean production.
>
> Thanks Magnus, that's very moving for me.
>
> I would like to add that i feel responsible here, in Java 7 we introduce
> the try-with-resources and i think it's now time to be bolder and introduce
> the try-without-resources that will help to make the planet greener.
>
> The try-without-resources, with the syntax
>   try() {  // notice here, no resources used !
>     ...
>   }
>
> is a responsible choice to everybody that crave to signal that
> he/she/their want to make an effort for the planet.
>
> Even if this Project is not yet voted, i think we can already allow
> everybody on Twitter to re-tweet Java codes with one or more
> trw-without-resources.
> It's all this little steps on Twitter that makes an impact for our blue
> planet.
>
> >
> > /Magnus
>
> Rémi
>
> >
> > [1] https://openjdk.java.net/projects/loom
> > [2]
> >
> https://www.europarl.europa.eu/news/en/headlines/society/20201208STO93327/the-impact-of-textile-production-and-waste-on-the-environment-infographic
>


More information about the discuss mailing list