Google's new "Go" language
Posted Nov 13, 2009 11:25 UTC (Fri) by farnz
In reply to: Google's new "Go" language
Parent article: Google's new "Go" language
But now, you've made the contents of f(), g() and h() uglier. Every function has to look something like:
function( ok, ... )
if( !ok )
Otherwise, what stops you getting into a state where f() was supposed to set up the world ready for h(), g() was supposed to modify that set up slightly (but fails in interesting and unfriendly ways, because the state that should have been created by f() doesn't exist), and h() bombs badly because the state it expected didn't exist at all, due to f() failing?
Further, every function needs a valid return value for the early exit case. This all just feels to me like a bad reinvention of exceptions, and I don't see how it's any better.
to post comments)