News for hackers. Stuff that matters.
Re:Exception Safety, Garbage Collection etc. (a.k.a. Why Doe... by munificent on Friday May 06, 2011 @04:34PM (#2522376)
That just pushes the problem around. You don't have to worry about forgetting to catch an exception, you have to worry about ignoring an error code.
Re:Exception Safety, Garbage Collection etc. (a.k.a. Why Doe... by JulianMorrison on Friday May 06, 2011 @04:44PM (#2522409)
Go's multiple return at least makes that simpler than C, you don't have to remember to check a global error code, and there are no magic return codes multiplexed with the expected response.

But the fundamental difference is that if you have code that does

    a()
    b()
    c()
then you can guarantee that a() will be executed, then b(), then c(). And if there are any branches in case of errors, they will be explicit. Exceptions surround every statement with the possibility of an unannounced exit.
Re:Exception Safety, Garbage Collection etc. (a.k.a. Why Doe... by edsrzf on Friday May 06, 2011 @05:13PM (#2522503)
Yes, but it's much easier to recognize ignored error codes than ignored exceptions:

http://blogs.msdn.com/b/oldnewthing/archive/2005/01/14/35294...

In Go, it's even easier to recognize ignored error codes because you tend to have fewer levels of indentation and sometimes an explicit "_" when you're discarding a return value.