News for hackers. Stuff that matters.
Re:Why I’m not leaving Python for Go by azth on Sunday September 23, 2012 @09:39PM (#4562821)
How is that different from

    func A() error {
        return compute.Something()
    }
Re:Why I’m not leaving Python for Go by JulianMorrison on Monday September 24, 2012 @03:22AM (#4563579)
My point is that whether it's "A() error" or "A() (int, error)", whether it calls one function or three, what it's doing with the error is throwing it up the line, rather than handling it locally. Exactly as if it had said "throw err". So yeah, your version is what I'd shorten it to in practise, it just wasn't quite so illustrative.
Re:Why I’m not leaving Python for Go by zmj on Sunday September 23, 2012 @11:36PM (#4563080)
The example is easier to extend to include additional logic after the call or another return value.