Google's Go
Walter Bright
newshound1 at digitalmars.com
Sat Jan 23 14:33:59 PST 2010
Andrei Alexandrescu wrote:
> Walter Bright wrote:
>> Since the default handling for exceptions
>> is to print a pretty message, like "cannot open file xxxxx", for many
>> utility programs that is all you need. You don't have to write any
>> error handling code, and yet your program handles errors correctly and
>> gracefully reports them to the user.
>
> I wouldn't go that far. Unfortunately, writing even exception-neutral
> code still changes the way one writes code even if you don't need to
> handle errors explicitly (fortunately scope statements help with that).
I agree that scope statements are only necessary if you need to recover
from errors. I don't know what you mean by how it changes the way one
writes code.
More information about the Digitalmars-d
mailing list