Also, I presume you meant fmt.Println (println shouldn't be used and almost surely doesn't return an error).
>is that if you make no effort to look at the error return of a function, it is automatically returned to your parent
That would be... very, very, very strange for a huge number of reasons. Syntactically, function signature wise... You're basically just asking for exceptions in that case. And besides, that's how most functions that can error work, as I'm sure you know from any example code.
function makeSomething() (Something, error) {
something = new(Something)
err = mightBreak(something)
if err != nil {
return nil, err
} else {
return something, nil
}
}
Yes, it's explicit error handling. Yes, it's griped about on every, single HN thread about Go. And the mailing list, extensively.For a parallel example, do you call checkError() on your PrintStream (System.out) in Java after calling System.out.println? If not, you're not really checking to make sure println worked: http://docs.oracle.com/javase/6/docs/api/java/io/PrintStream...