News for hackers. Stuff that matters.
Re:Go hits the concurrency nail on the head by ZainRiz on Thursday October 04, 2018 @04:50PM (#18143543)
He does. He referenced it when referring to the color of functions: "I've enjoyed Bob Nystrom's What Color is Your Function[1] for explaining how annoying the model of "non-blocking only here, please" is."

The linked article [1] explains his take on why those futures, etc not good enough.

[1]http://journal.stuffwithstuff.com/2015/02/01/what-color-is-y...

Re:Go hits the concurrency nail on the head by hyperpape on Friday October 05, 2018 @09:24AM (#18147886)
I don't know who owns the term "futures", but the limitations of javascript promises are just choices that javascript made.

In Java, you can write:

    List<Future<String>> futures = new ArrayList<>();
    ...loop that populates futures
    List<String> strings = futures.stream().map(Future::get);
The loop will run a series of futures (potentially asynchronously...the use of a Future is decoupled from the actual choice of thread pool, etc). The map will collect the results in a blocking fashion. And Future.get() will rethrow any errors that were uncaught in the execution.