News for hackers. Stuff that matters.
Re:Go hits the concurrency nail on the head by apta on Friday October 05, 2018 @04:39PM (#18151548)
> If you think actors, futures, and async/await are so great, imagine having to write every single function invocation in that manner.

I don't see how:

    val f = Future { foo() }
    // do work...
    f match {
       case Success(res) => useRes(res)
       case Failure(error) => handleError(error)
    }
Is any more difficult than:

    done := make(chan bool)
    var res int
    go foo(done, &res)
    <-done
    useRes(res)
As a matter of fact, the first one is much easier. I don't have to create and pass a channel, and manually handle returning a success or failure. The first approach is much better
Re:Go hits the concurrency nail on the head by wahern on Monday October 08, 2018 @09:25PM (#18172675)
You're not understanding (or at least not appreciating) the function color problem mentioned in the article. See, e.g., http://journal.stuffwithstuff.com/2015/02/01/what-color-is-y...
Re:Go hits the concurrency nail on the head by apta on Thursday October 11, 2018 @11:09PM (#18198885)
I read that article before. Here's the thing, the only thing that the "go" keyword makes easier is having the ability to have any arbitrary function run in a green thread without having to modify it's signature. However, the moment you want to actually do something useful with it (e.g. communicate with it, cancel it, or read its returned value), you're going to have to pass a channel (or more) or a waitgroup to it anyway, modifying its signature and changing its "color". The issue remains pretty much the same.