News for hackers. Stuff that matters.
Re:Announcing Rust 1.13 by stouset on Thursday November 10, 2016 @06:05PM (#12925435)
Really? Really?

    foo()?.bar()?.baz()?
This is somehow less clear, and somehow "more debuggable" than

    a, err := foo()
    if err != nil {
        nil, err 
    }
    b, err := a.bar()
    if err != nil {
        nil, err 
    }
    c, err := b.baz()
    if err != nil {
        nil, err 
    }
    return c, nil
One of these obviously has no bugs. There is literally nothing to debug. The other has no obvious bugs.

Oh, except look again, I accidentally forgot to return from those error-handling-statements and now I have what should have been a completely avoidable bug.

Ask me how many times I've been bitten by this.

Re:Announcing Rust 1.13 by iand on Thursday November 10, 2016 @06:36PM (#12925744)
OK, how many times have you been bitten by it?

It doesn't even compile so I doubt you have run into it in real code.

Re:Announcing Rust 1.13 by andrewchambers on Thursday November 10, 2016 @07:57PM (#12926386)
that problem does compile in Go, and i have done it before (maybe with single err and not a comma). iirc there are go vet checks to catch that.
Re:Announcing Rust 1.13 by iand on Friday November 11, 2016 @04:21PM (#12934463)
See my other comment for runnable example. https://news.ycombinator.com/item?id=12925765