Google's Go & Exceptions
Walter Bright
newshound1 at digitalmars.com
Tue Jan 26 10:46:18 PST 2010
bearophile wrote:
> In GCC there is also the "warn_unused_result" function attribute that
> raises a compile time warning if you don't use the return value of a
> function:
That may wind up suffering similar problems as checked exceptions do -
just do a quick and dirty assign the return value to a hastily declared
temp and ignore it, meaning to fix it later.
Of course, it doesn't actually get fixed later. Even worse, during code
reviews, it will look like the code is paying attention to the error
code, but it won't be.
More information about the Digitalmars-d
mailing list